[FFmpeg-devel] [PATCH] add support for "Forward Uncompressed" (issue1467)

Michael Niedermayer michaelni
Tue Oct 13 19:38:11 CEST 2009


On Tue, Oct 13, 2009 at 02:27:30PM +0200, Reimar D?ffinger wrote:
> On Tue, Oct 13, 2009 at 12:45:32PM +0200, Michael Niedermayer wrote:
> > On Tue, Oct 13, 2009 at 11:11:08AM +0200, Reimar D?ffinger wrote:
> > > Hello,
> > > another custom uncompressed codec.
> > 
> > [...]
> > > +static av_cold int decode_init(AVCodecContext *avctx)
> > > +{
> > > +    if (avctx->width & 1) {
> > > +        av_log(avctx, AV_LOG_ERROR, "FRWU needs even width\n");
> > > +        return -1;
> > > +    }
> > 
> > > +    if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0)
> > > +        return -1;
> > 
> > dont we check that in common code already?
> 
> Yes, looks like it. A huge number of codecs seem to do this though.

Some do also need it, like the ones changing width/height


> 
> > also can interlaced_frame/top_field_first be set better than not set?
> 
> Yes, I did it according to the documentation of the codec.
> Note that the sample I have does not seem to be actually interlaced
> (this codec just always stores frames as interlaced, not matter what),
> so I could not check this too well.
> The most funny thing is that the documentation also says that width and
> height must be divisible by 16, though I see no reason at all for that.

>  libavcodec/Makefile    |    1 
>  libavcodec/allcodecs.c |    1 
>  libavcodec/avcodec.h   |    1 
>  libavcodec/frwu.c      |  120 +++++++++++++++++++++++++++++++++++++++++++++++++
>  libavformat/riff.c     |    1 
>  5 files changed, 124 insertions(+)
> f53e7c5cdbedcca9a5445d00a07ac34c00d2a21d  frwu.diff
[...]
> +static av_cold int decode_close(AVCodecContext *avctx)
> +{
> +    av_freep(&avctx->coded_frame);
> +
> +    return 0;
> +}

missing release_buffer()
except that patch ok


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091013/e5de2917/attachment.pgp>



More information about the ffmpeg-devel mailing list