Browse code

mpegencconetxt: Move rv10-specific orig_width/orig_height where they belong

Signed-off-by: Diego Biurrun <diego@biurrun.de>

Nidhi Makhijani authored on 2014/07/20 18:21:38
Showing 2 changed files
... ...
@@ -542,7 +542,6 @@ typedef struct MpegEncContext {
542 542
     /* RV10 specific */
543 543
     int rv10_version; ///< RV10 version: 0 or 3
544 544
     int rv10_first_dc_coded[3];
545
-    int orig_width, orig_height;
546 545
 
547 546
     /* MJPEG specific */
548 547
     struct MJpegContext *mjpeg_ctx;
... ...
@@ -46,6 +46,7 @@
46 46
 typedef struct RVDecContext {
47 47
     MpegEncContext m;
48 48
     int sub_id;
49
+    int orig_width, orig_height;
49 50
 } RVDecContext;
50 51
 
51 52
 static const uint16_t rv_lum_code[256] = {
... ...
@@ -365,8 +366,8 @@ static int rv20_decode_picture_header(RVDecContext *rv)
365 365
             new_w = 4 * ((uint8_t *) s->avctx->extradata)[6 + 2 * f];
366 366
             new_h = 4 * ((uint8_t *) s->avctx->extradata)[7 + 2 * f];
367 367
         } else {
368
-            new_w = s->orig_width;
369
-            new_h = s->orig_height;
368
+            new_w = rv->orig_width;
369
+            new_h = rv->orig_height;
370 370
         }
371 371
         if (new_w != s->width || new_h != s->height) {
372 372
             av_log(s->avctx, AV_LOG_DEBUG,
... ...
@@ -460,10 +461,10 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
460 460
     s->out_format  = FMT_H263;
461 461
     s->codec_id    = avctx->codec_id;
462 462
 
463
-    s->orig_width  =
464
-    s->width       = avctx->coded_width;
465
-    s->orig_height =
466
-    s->height      = avctx->coded_height;
463
+    rv->orig_width  =
464
+    s->width        = avctx->coded_width;
465
+    rv->orig_height =
466
+    s->height       = avctx->coded_height;
467 467
 
468 468
     s->h263_long_vectors = ((uint8_t *) avctx->extradata)[3] & 1;
469 469
     rv->sub_id           = AV_RB32((uint8_t *) avctx->extradata + 4);