[FFmpeg-devel] [PATCH] Use correct colorspace in Cinepak decoder.

u-bo1b at 0w.se u-bo1b at 0w.se
Tue Feb 19 17:08:21 CET 2013


On Tue, Feb 19, 2013 at 01:55:55PM +0100, Michael Niedermayer wrote:
> > A safe and efficient approach would be to be able to adjust the frame
> > size up to a multiple of 4 (mplayer actually seems to do that?).
> > Is there any way to properly set this from inside the decoder?
> 
> Please see avcodec_set_dimensions()
> and
> avcodec_align_dimensions2()

Oh I see, this was an unknown for me "safety net" which kept the old
decoder alive, at least when used from the ffmpeg/ffplay programs.

It's a pity that this is hardcoded in a place which a casual codec
developer may miss. (Is it safe to assume that a program using a codec
implicitely allocates the frame using avcodec_align_dimensions2()?)

> Note, also later provides a large enough buffer for yuv420 but not for
> rgb, as cinepack isnt listed in it as requireing one

I am not aware of any real life cinepak sample with (width&3)!=0.

The binary encoder if run with such dimensions under mencoder produces
broken streams which are not played correctly with the binary decoder
either (may be mencoder is doing something wrong but I can not easily
test under Windows right now).

The open source encoder does not support (width&3)!=0.

For the moment I do not feel it is crucial to improve the decoder to
support such dimensions.

Unfortunately my time slice available for ffmpeg is over now.
I can no more improve the Cinepak patches.

Thanks Michael for taking your time to consider the patches and for the
hard work you put into ffmpeg.

Best regards,
Rl



More information about the ffmpeg-devel mailing list