Browse Source

Merge commit '9f99a5f1d078721a30a76aec27c58805b7b87e58'

* commit '9f99a5f1d078721a30a76aec27c58805b7b87e58':
  mpegencconetxt: Move rv10-specific orig_width/orig_height where they belong

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4
Michael Niedermayer 11 years ago
parent
commit
02e3e3ea51
2 changed files with 7 additions and 7 deletions
  1. +0
    -1
      libavcodec/mpegvideo.h
  2. +7
    -6
      libavcodec/rv10.c

+ 0
- 1
libavcodec/mpegvideo.h View File

@@ -556,7 +556,6 @@ typedef struct MpegEncContext {
/* RV10 specific */ /* RV10 specific */
int rv10_version; ///< RV10 version: 0 or 3 int rv10_version; ///< RV10 version: 0 or 3
int rv10_first_dc_coded[3]; int rv10_first_dc_coded[3];
int orig_width, orig_height;


/* MJPEG specific */ /* MJPEG specific */
struct MJpegContext *mjpeg_ctx; struct MJpegContext *mjpeg_ctx;


+ 7
- 6
libavcodec/rv10.c View File

@@ -46,6 +46,7 @@
typedef struct RVDecContext { typedef struct RVDecContext {
MpegEncContext m; MpegEncContext m;
int sub_id; int sub_id;
int orig_width, orig_height;
} RVDecContext; } RVDecContext;


static const uint16_t rv_lum_code[256] = { static const uint16_t rv_lum_code[256] = {
@@ -369,8 +370,8 @@ static int rv20_decode_picture_header(RVDecContext *rv)
new_w = 4 * ((uint8_t *) s->avctx->extradata)[6 + 2 * f]; new_w = 4 * ((uint8_t *) s->avctx->extradata)[6 + 2 * f];
new_h = 4 * ((uint8_t *) s->avctx->extradata)[7 + 2 * f]; new_h = 4 * ((uint8_t *) s->avctx->extradata)[7 + 2 * f];
} else { } else {
new_w = s->orig_width;
new_h = s->orig_height;
new_w = rv->orig_width;
new_h = rv->orig_height;
} }
if (new_w != s->width || new_h != s->height) { if (new_w != s->width || new_h != s->height) {
AVRational old_aspect = s->avctx->sample_aspect_ratio; AVRational old_aspect = s->avctx->sample_aspect_ratio;
@@ -479,10 +480,10 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
s->out_format = FMT_H263; s->out_format = FMT_H263;
s->codec_id = avctx->codec_id; s->codec_id = avctx->codec_id;


s->orig_width =
s->width = avctx->coded_width;
s->orig_height =
s->height = avctx->coded_height;
rv->orig_width =
s->width = avctx->coded_width;
rv->orig_height =
s->height = avctx->coded_height;


s->h263_long_vectors = ((uint8_t *) avctx->extradata)[3] & 1; s->h263_long_vectors = ((uint8_t *) avctx->extradata)[3] & 1;
rv->sub_id = AV_RB32((uint8_t *) avctx->extradata + 4); rv->sub_id = AV_RB32((uint8_t *) avctx->extradata + 4);


Loading…
Cancel
Save