codecparsers: vc1: fix ttmbf when vstransform is not set 86/1786/1
authorZhao Halley <halley.zhao@intel.com>
Wed, 19 Sep 2012 01:24:58 +0000 (09:24 +0800)
committerZhao Halley <halley.zhao@intel.com>
Wed, 19 Sep 2012 02:22:25 +0000 (10:22 +0800)
spec 8.3.6.2.1 Transform Type Selection
  If variable-sized transform coding is not enabled,
  then the 8x8 transform shall be used for all blocks.

I have to say the above spec isn't expressed clearly:
ttfrm is mentioned clearly, but not ttmbf.
anyway, since ttfrm is only specified when ttmbs is set,
we can deduce that ttmbf should set to 1.
it is also consistent with ffmpeg vc1 decoder and
hw behaviour (Intel GEN gfx)

https://bugzilla.gnome.org/show_bug.cgi?id=684341
https://bugs.tizen.org/jira/browse/TIVI-154

gst-libs/gst/codecparsers/gstvc1parser.c [changed mode: 0644->0755]
packaging/gst-plugins-bad.changes

old mode 100644 (file)
new mode 100755 (executable)
index 8f2937f..a87a870
@@ -1163,6 +1163,10 @@ parse_frame_header_advanced (GstBitReader * br, GstVC1FrameHdr * framehdr,
           READ_UINT8 (br, pic->ttfrm, 2);
         }
       }
+      else { // 8.3.6.2.1
+        pic->ttmbf = 1;
+        pic->ttfrm = 0;
+      }
 
       framehdr->transacfrm = get_unary (br, 0, 2);
       READ_UINT8 (br, framehdr->transdctab, 1);
@@ -1275,6 +1279,10 @@ parse_frame_header_advanced (GstBitReader * br, GstVC1FrameHdr * framehdr,
           READ_UINT8 (br, pic->ttfrm, 2);
         }
       }
+      else { // 8.3.6.2.1
+        pic->ttmbf = 1;
+        pic->ttfrm = 0;
+      }
 
       framehdr->transacfrm = get_unary (br, 0, 2);
       READ_UINT8 (br, framehdr->transdctab, 1);
@@ -1459,6 +1467,10 @@ parse_frame_header (GstBitReader * br, GstVC1FrameHdr * framehdr,
           GST_DEBUG ("ttfrm %u", pic->ttfrm);
         }
       }
+      else { // 8.3.6.2.1
+        pic->ttmbf = 1;
+        pic->ttfrm = 0;
+      }
 
       framehdr->transacfrm = get_unary (br, 0, 2);
       READ_UINT8 (br, framehdr->transdctab, 1);
@@ -1491,6 +1503,10 @@ parse_frame_header (GstBitReader * br, GstVC1FrameHdr * framehdr,
           READ_UINT8 (br, pic->ttfrm, 2);
         }
       }
+      else { // 8.3.6.2.1
+        pic->ttmbf = 1;
+        pic->ttfrm = 0;
+      }
 
       framehdr->transacfrm = get_unary (br, 0, 2);
       READ_UINT8 (br, framehdr->transdctab, 1);
index 9e593f0..72c1cff 100644 (file)
@@ -1,3 +1,6 @@
+* Wed Sep 19 2012 Halley Zhao<halley.zhao@intel.com> submit/trunk/20120815.070008@762b0a9
+- fix bug TIVI-154. fix vc1 parser issue of ttmbf when vstransform is not set.
+
 * Thu Sep 13 2012 Yan Yin <yan.yin@intel.com> submit/trunk/20120815.070008@762b0a9
 - move many .so to main package, fix bug TIVI-177.