[FFmpeg-cvslog] mpeg4videodec: move scalability from MpegEncContext to Mpeg4DecContext

Anton Khirnov git at videolan.org
Sat Nov 30 04:30:06 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Nov 26 14:34:52 2013 +0100| [58c120a9290eef057dbf26761a4f89b7f67bbde1] | committer: Anton Khirnov

mpeg4videodec: move scalability from MpegEncContext to Mpeg4DecContext

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58c120a9290eef057dbf26761a4f89b7f67bbde1
---

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

diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h
index 6337a08..5a1906f 100644
--- a/libavcodec/mpeg4video.h
+++ b/libavcodec/mpeg4video.h
@@ -75,6 +75,7 @@ typedef struct Mpeg4DecContext {
 
     int new_pred;
     int enhancement_type;
+    int scalability;
 
     /* bug workarounds */
     int divx_version;
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 114d245..2e320cd 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -1953,9 +1953,9 @@ no_cplx_est:
             ctx->new_pred = 0;
         }
 
-        s->scalability = get_bits1(gb);
+        ctx->scalability = get_bits1(gb);
 
-        if (s->scalability) {
+        if (ctx->scalability) {
             GetBitContext bak = *gb;
             int h_sampling_factor_n;
             int h_sampling_factor_m;
@@ -1975,7 +1975,7 @@ no_cplx_est:
                 v_sampling_factor_n == 0 || v_sampling_factor_m == 0) {
                 /* illegal scalability header (VERY broken encoder),
                  * trying to workaround */
-                s->scalability = 0;
+                ctx->scalability = 0;
                 *gb            = bak;
             } else
                 av_log(s->avctx, AV_LOG_ERROR, "scalability not supported\n");
@@ -2249,7 +2249,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
                    ctx->cplx_estimation_trash_b);
         }
 
-        if (!s->scalability) {
+        if (!ctx->scalability) {
             if (ctx->shape != RECT_SHAPE && s->pict_type != AV_PICTURE_TYPE_I)
                 skip_bits1(gb);  // vop shape coding type
         } else {
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 55e61da..69352f9 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -589,7 +589,6 @@ typedef struct MpegEncContext {
     int mcsel;
     int quant_precision;
     int quarter_sample;              ///< 1->qpel, 0->half pel ME/MC
-    int scalability;
     int aspect_ratio_info; //FIXME remove
     int sprite_warping_accuracy;
     int data_partitioning;           ///< data partitioning flag from header



More information about the ffmpeg-cvslog mailing list