diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-07-26 00:49:46 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-07-26 00:49:46 +0000 |
commit | ff862be5ed2d7d6799ee23e04c5fbee0c1e1f987 (patch) | |
tree | 09e9f2dfcd57a463f3d226e8f3ab3a1b735facdd /libavcodec | |
parent | 0c938bd10267a3f41c3ec9f5a82e2c7eaad511f7 (diff) | |
download | ffmpeg-ff862be5ed2d7d6799ee23e04c5fbee0c1e1f987.tar.gz |
ati vcr2 uv swap
Originally committed as revision 2084 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg12.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 46c0162588..62734b4778 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1791,6 +1791,12 @@ static void mpeg_decode_extension(AVCodecContext *avctx, } } +static void exchange_uv(AVFrame *f){ + uint8_t *t= f->data[1]; + f->data[1]= f->data[2]; + f->data[2]= t; +} + #define DECODE_SLICE_FATAL_ERROR -2 #define DECODE_SLICE_ERROR -1 #define DECODE_SLICE_OK 0 @@ -1945,8 +1951,14 @@ static int mpeg_decode_slice(AVCodecContext *avctx, MPV_decode_mb(s, s->block); if (++s->mb_x >= s->mb_width) { + if(s->avctx->codec_tag == ff_get_fourcc("VCR2")) + exchange_uv((AVFrame*)s->current_picture_ptr); + ff_draw_horiz_band(s, 16*s->mb_y, 16); + if(s->avctx->codec_tag == ff_get_fourcc("VCR2")) + exchange_uv((AVFrame*)s->current_picture_ptr); + s->mb_x = 0; s->mb_y++; @@ -2033,6 +2045,9 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) ff_print_debug_info(s, s->last_picture_ptr); } } + if(s->avctx->codec_tag == ff_get_fourcc("VCR2")) + exchange_uv(pict); + return 1; } else { return 0; @@ -2164,6 +2179,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) s->width = avctx->width; s->height = avctx->height; avctx->has_b_frames= 0; //true? + s->low_delay= 1; s->avctx = avctx; if (MPV_common_init(s) < 0) |