[FFmpeg-devel] [PATCH] Add CPiA video decoder

Stephan Hilb stephan at ecshi.net
Thu Aug 30 11:27:05 CEST 2012


I added the copyright note and a link to the code the decoder is based
The other issues are fixed and some of the more obvious comments are

>> +        s1->video_codec_id = codec_id;
> How does this work now for MJPEG?
> (Or doesn't it work at all?)

No special handling for the MJPEG codec is needed, but in
mmap_read_frame I need to know video_codec_id to cope with the variable
frame_size of cpia.
If pixel_format was specified explicitly, then video_codec_id is set
correctly by:

    AVCodec *codec = avcodec_find_decoder_by_name(s->pixel_format);
    if (codec)
        s1->video_codec_id = codec->id;
    pix_fmt = av_get_pix_fmt(s->pixel_format);

Otherwise device_try_init sets codec_id in

    desired_format = device_try_init(s1, pix_fmt, &s->width, &s->height,

but it isn't saved to the context video_codec_id for later use.
I guess this wasn't needed up until now.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-CPiA-video-decoder.patch
Type: text/x-patch
Size: 13100 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120830/1e92121c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120830/1e92121c/attachment.asc>

More information about the ffmpeg-devel mailing list