Merge commit '58c120a9290eef057dbf26761a4f89b7f67bbde1'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 30 Nov 2013 03:21:45 +0000 (04:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 30 Nov 2013 03:23:43 +0000 (04:23 +0100)
* commit '58c120a9290eef057dbf26761a4f89b7f67bbde1':
  mpeg4videodec: move scalability from MpegEncContext to Mpeg4DecContext

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg4video.h
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.h

index 15fe68f..d8751f7 100644 (file)
@@ -75,6 +75,7 @@ typedef struct Mpeg4DecContext {
 
     int new_pred;
     int enhancement_type;
+    int scalability;
 
     /* bug workarounds */
     int divx_version;
index 8a934b5..bda8c5e 100644 (file)
@@ -1991,9 +1991,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;
@@ -2013,7 +2013,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");
@@ -2028,7 +2028,7 @@ no_cplx_est:
                ctx->time_increment_bits,
                s->quant_precision,
                s->progressive_sequence,
-               s->scalability ? "scalability " :"" , s->quarter_sample ? "qpel " : "",
+               ctx->scalability ? "scalability " :"" , s->quarter_sample ? "qpel " : "",
                s->data_partitioning ? "partition " : "", ctx->rvlc ? "rvlc " : ""
         );
     }
@@ -2441,7 +2441,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
                   );
         }
 
-        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 {
index 9225beb..acc047c 100644 (file)
@@ -605,7 +605,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