[SCM] libav/experimental: RES_SM in WMV3 is really two flags, so split it in decoder

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:16:16 UTC 2013


The following commit has been merged in the experimental branch:
commit 10f93363b77b0fdd42acf5626ed896703908c9d3
Author: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:   Sun Sep 26 13:54:35 2010 +0000

    RES_SM in WMV3 is really two flags, so split it in decoder
    
    Originally committed as revision 25208 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index cca345d..d9d7d51 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -306,11 +306,16 @@ int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitConte
     {
         v->zz_8x4 = wmv2_scantableA;
         v->zz_4x8 = wmv2_scantableB;
-        v->res_sm = get_bits(gb, 2); //reserved
-        if (v->res_sm)
+        v->res_y411   = get_bits1(gb);
+        v->res_sprite = get_bits1(gb);
+        if (v->res_y411)
         {
             av_log(avctx, AV_LOG_ERROR,
-                   "Reserved RES_SM=%i is forbidden\n", v->res_sm);
+                   "Old interlaced mode is not supported\n");
+            return -1;
+        }
+        if (v->res_sprite) {
+            av_log(avctx, AV_LOG_ERROR, "WMVP is not supported\n");
             return -1;
         }
     }
diff --git a/libavcodec/vc1.h b/libavcodec/vc1.h
index d5f0e05..e5a9cba 100644
--- a/libavcodec/vc1.h
+++ b/libavcodec/vc1.h
@@ -160,7 +160,8 @@ typedef struct VC1Context{
 
     /** Simple/Main Profile sequence header */
     //@{
-    int res_sm;           ///< reserved, 2b
+    int res_sprite;       ///< reserved, sprite mode
+    int res_y411;         ///< reserved, old interlaced mode
     int res_x8;           ///< reserved
     int multires;         ///< frame-level RESPIC syntax element present
     int res_fasttx;       ///< reserved, always 1

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list