From e769f0535e340b1263b6246f5666e653f6deeb7a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 26 Aug 2002 20:45:01 +0000 Subject: [PATCH] added aspected_width/height for EXTENDED_PAR Originally committed as revision 869 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/avcodec.h | 6 +++++- libavcodec/mpegvideo.c | 5 +++++ libavcodec/mpegvideo.h | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 6d0e379e30..cd40715230 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -152,6 +152,7 @@ typedef struct AVCodecContext { #define FF_ASPECT_4_3_525 3 #define FF_ASPECT_16_9_625 4 #define FF_ASPECT_16_9_525 5 +#define FF_ASPECT_EXTENDED 15 int gop_size; /* 0 = intra only */ enum PixelFormat pix_fmt; /* pixel format, see PIX_FMT_xxx */ int repeat_pict; /* when decoding, this signal how much the picture */ @@ -304,6 +305,9 @@ typedef struct AVCodecContext { float i_quant_offset;/* qscale offset between i and p frames */ float rc_initial_cplx; + int aspected_width; + int aspected_height; + //FIXME this should be reordered after kabis API is finished ... //TODO kill kabi /* @@ -334,7 +338,7 @@ typedef struct AVCodecContext { uc_res6,uc_res7,uc_res8,uc_res9,uc_res10,uc_res11,uc_res12; unsigned int ui_res0,ui_res1,ui_res2,ui_res3,ui_res4,ui_res5,ui_res6,ui_res7,ui_res8,ui_res9, - ui_res10,ui_res11,ui_res12,ui_res13,ui_res14,ui_res15,ui_res16,ui_res17,ui_res18,ui_res19; + ui_res10,ui_res11,ui_res12,ui_res13,ui_res14,ui_res15,ui_res16,ui_res17; } AVCodecContext; typedef struct AVCodec { diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 22c6fc9656..b4f6502986 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -382,6 +382,11 @@ int MPV_encode_init(AVCodecContext *avctx) s->qblur= avctx->qblur; s->avctx = avctx; s->aspect_ratio_info= avctx->aspect_ratio_info; + if (avctx->aspect_ratio_info == FF_ASPECT_EXTENDED) + { + s->aspected_width = avctx->aspected_width; + s->aspected_height = avctx->aspected_height; + } s->flags= avctx->flags; s->max_b_frames= avctx->max_b_frames; s->b_frame_strategy= avctx->b_frame_strategy; diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 4bbcdf77cc..ce9282c5f5 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -360,6 +360,8 @@ typedef struct MpegEncContext { int new_pred; int reduced_res_vop; int aspect_ratio_info; + int aspected_width; + int aspected_height; int sprite_warping_accuracy; int low_latency_sprite; int data_partitioning; @@ -415,7 +417,6 @@ typedef struct MpegEncContext { /* [mb_intra][isChroma][level][run][last] */ int ac_stats[2][2][MAX_LEVEL+1][MAX_RUN+1][2]; int inter_intra_pred; - /* decompression specific */ GetBitContext gb;