Author: benoit Date: Wed May 2 10:18:28 2007 New Revision: 8865 Log: make mpeg decoder handle mid-stream changes in resolution patch by Heikki Lindholm holindho at cs helsinki fi original thread: [Ffmpeg-devel] [PATCH] fix mid-stream resolution changes date: Sat Mar 31 13:52:50 CEST 2007 Modified: trunk/libavcodec/mpeg12.c Modified: trunk/libavcodec/mpeg12.c ============================================================================== --- trunk/libavcodec/mpeg12.c (original) +++ trunk/libavcodec/mpeg12.c Wed May 2 10:18:28 2007 @@ -2084,6 +2084,7 @@ typedef struct Mpeg1Context { int slice_count; int swap_uv;//indicate VCR2 int save_aspect_info; + int save_width, save_height; AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator } Mpeg1Context; @@ -2138,6 +2139,8 @@ static int mpeg_decode_postinit(AVCodecC (s1->mpeg_enc_ctx_allocated == 0)|| avctx->coded_width != s->width || avctx->coded_height != s->height|| + s1->save_width != s->width || + s1->save_height != s->height || s1->save_aspect_info != s->aspect_ratio_info|| 0) { @@ -2155,6 +2158,8 @@ static int mpeg_decode_postinit(AVCodecC avcodec_set_dimensions(avctx, s->width, s->height); avctx->bit_rate = s->bit_rate; s1->save_aspect_info = s->aspect_ratio_info; + s1->save_width = s->width; + s1->save_height = s->height; //low_delay may be forced, in this case we will have B frames //that behave like P frames
benoit <subversion <at> mplayerhq.hu> writes:
Author: benoit Date: Wed May 2 10:18:28 2007 New Revision: 8865
Log:
make mpeg decoder handle mid-stream changes in resolution patch by Heikki Lindholm holindho at cs helsinki fi original thread: [Ffmpeg-devel] [PATCH] fix mid-stream resolution changes date: Sat Mar 31 13:52:50 CEST 2007
Modified: trunk/libavcodec/mpeg12.c
This patch broke decoding of VCR2. Sample: http://samples.mplayerhq.hu/V-codecs/ATI-VCR12/ATI/VCR2test.avi (The sky has to be blue for this sample, but is red since this change) Carl Eugen
On Sun, Jan 24, 2010 at 05:28:23PM +0000, Carl Eugen Hoyos wrote:
benoit <subversion <at> mplayerhq.hu> writes:
Author: benoit Date: Wed May 2 10:18:28 2007 New Revision: 8865
Log:
make mpeg decoder handle mid-stream changes in resolution patch by Heikki Lindholm holindho at cs helsinki fi original thread: [Ffmpeg-devel] [PATCH] fix mid-stream resolution changes date: Sat Mar 31 13:52:50 CEST 2007
Modified: trunk/libavcodec/mpeg12.c
This patch broke decoding of VCR2. Sample: http://samples.mplayerhq.hu/V-codecs/ATI-VCR12/ATI/VCR2test.avi (The sky has to be blue for this sample, but is red since this change)
sounds like swap_uv being wrong, shouldnt be hard to figure out by adding a few av_log() to see if thats true and where its changed but my todo is quite big, help welcome ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates
participants (3)
-
cehoyos@ag.or.at -
michaelni@gmx.at -
subversion@mplayerhq.hu