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

Michael Niedermayer michaelni at gmx.at
Wed Feb 20 03:51:43 CET 2013

On Tue, Feb 19, 2013 at 05:08:21PM +0100, u-bo1b at 0w.se wrote:
> 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.

ok, applied patch and did some cleanup


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130220/644b5c55/attachment.asc>

More information about the ffmpeg-devel mailing list