[libav-devel] [PATCH 20/27] mpeg4videodec: move reduced_res_vop from MpegEncContext to Mpeg4DecContext

Anton Khirnov anton at khirnov.net
Tue Nov 26 15:52:16 CET 2013


---
 libavcodec/mpeg4video.h    |    2 ++
 libavcodec/mpeg4videodec.c |    6 +++---
 libavcodec/mpegvideo.h     |    1 -
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h
index d9a6833..2dbc213 100644
--- a/libavcodec/mpeg4video.h
+++ b/libavcodec/mpeg4video.h
@@ -73,6 +73,8 @@ typedef struct Mpeg4DecContext {
     ///< time distance of first I -> B, used for interlaced b frames
     int t_frame;
 
+    int reduced_res_vop;
+
     /* bug workarounds */
     int divx_version;
     int divx_build;
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index c6b0c06..b7e5d8c 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -1946,13 +1946,13 @@ no_cplx_est:
                 skip_bits(gb, 2); /* requested upstream message type */
                 skip_bits1(gb);   /* newpred segment type */
             }
-            s->reduced_res_vop = get_bits1(gb);
-            if (s->reduced_res_vop)
+            ctx->reduced_res_vop = get_bits1(gb);
+            if (ctx->reduced_res_vop)
                 av_log(s->avctx, AV_LOG_ERROR,
                        "reduced resolution VOP not supported\n");
         } else {
             s->new_pred        = 0;
-            s->reduced_res_vop = 0;
+            ctx->reduced_res_vop = 0;
         }
 
         s->scalability = get_bits1(gb);
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 8250211..3d4e26d 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -593,7 +593,6 @@ typedef struct MpegEncContext {
     int hierachy_type;
     int enhancement_type;
     int new_pred;
-    int reduced_res_vop;
     int aspect_ratio_info; //FIXME remove
     int sprite_warping_accuracy;
     int data_partitioning;           ///< data partitioning flag from header
-- 
1.7.10.4



More information about the libav-devel mailing list