[FFmpeg-devel] [PATCH] HWAccel infrastructure (take 7.2)

Michael Niedermayer michaelni
Tue Feb 24 16:17:26 CET 2009


On Tue, Feb 24, 2009 at 03:51:48PM +0100, Gwenole Beauchesne wrote:
> On Tue, 24 Feb 2009, Michael Niedermayer wrote:
> 
> >> +/**
> >> + * Allowed pixel formats for H.263 codec (4:2:0 chroma format)
> >> + * Note: HW accelerated formats shall come first
> >> + */
> >> +static const enum PixelFormat h263_pixfmt_list_420[] = {
> >> +    PIX_FMT_YUV420P,
> >> +    PIX_FMT_NONE
> >> +};
> >> +
> >> +/**
> >> + * Allowed pixel formats for MPEG-4 codec (4:2:0 chroma format)
> >> + * Note: HW accelerated formats shall come first
> >> + */
> >> +static const enum PixelFormat mpeg4_pixfmt_list_420[] = {
> >> +    PIX_FMT_YUV420P,
> >> +    PIX_FMT_NONE
> >> +};
> >
> > duplicate
> 
> Please think N+1 or N+2. This will be filled in differently in next patch, 
> thus making them smaller...

if the 2 lists will or will not become different in a future patch is
not certain.


> 
> >> +/** Returns the pixel format list for the specified codec (4:2:0 chroma format) */
> >> +static inline const enum PixelFormat *get_pixfmt_list(enum CodecID codec_id)
> >> +{
> >> +    switch (codec_id) {
> >> +    case CODEC_ID_H263:  return h263_pixfmt_list_420;
> >> +    case CODEC_ID_MPEG4: return mpeg4_pixfmt_list_420;
> >> +    default: assert(0);
> >> +    }
> >> +    return NULL;
> >> +}
> >> +
> >>  av_cold int ff_h263_decode_init(AVCodecContext *avctx)
> >>  {
> >>      MpegEncContext *s = avctx->priv_data;
> >
> > this makes no sense
> 
> but to suit space and indentation satanists (fit one line instead of 
> spanning it all over several lines).

the above code is not on one line

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- 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/20090224/07d3b935/attachment.pgp>



More information about the ffmpeg-devel mailing list