[FFmpeg-devel] [PATCH] lavc/dnxhdenc: print valid dnxhd profiles when codec parameters are invalid

Matthieu Bouron matthieu.bouron at gmail.com
Sat Jan 19 15:34:09 CET 2013


On Sat, Jan 19, 2013 at 02:42:37PM +0100, Michael Niedermayer wrote:
> On Sat, Jan 19, 2013 at 12:58:21PM +0100, Matthieu Bouron wrote:
> > ---
> >  libavcodec/dnxhdenc.c | 38 +++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 37 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
> > index 690e64f..8a65f33 100644
> > --- a/libavcodec/dnxhdenc.c
> > +++ b/libavcodec/dnxhdenc.c
> > @@ -247,6 +247,41 @@ static int dnxhd_init_rc(DNXHDEncContext *ctx)
> >      return -1;
> >  }
> >  
> > +static void dnxhd_print_profiles(AVCodecContext *avctx, int loglevel)
> > +{
> > +    av_log(avctx, loglevel, "Frame size: 1920x1080p; bitrate: 36Mbps;  pixel format: yuv422p;   framerate: 24000/1001\n");
> > +    av_log(avctx, loglevel, "Frame size: 1920x1080p; bitrate: 115Mbps; pixel format: yuv422p;   framerate: 24000/1001\n");
> > +    av_log(avctx, loglevel, "Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p;   framerate: 24000/1001\n");
> > +    av_log(avctx, loglevel, "Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p10; framerate: 24000/1001\n");
> > +    av_log(avctx, loglevel, "Frame size: 1920x1080p; bitrate: 120Mbps; pixel format: yuv422p;   framerate: 25/1\n");
> > +    av_log(avctx, loglevel, "Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p;   framerate: 25/1\n");
> > +    av_log(avctx, loglevel, "Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p10; framerate: 25/1\n");
> 
> isnt there a table somewhere that can be pringted with a loop?
> so that additions to that table would also update the prinout magically
> 

There is the cid table in the dnxhddata.c file.
It requires to add new fields to associate framerate, pixel format,
bitrate and interlaced settings to have the same detailed output.

Indeed, it would be a better solution.

Matthieu

[...]


More information about the ffmpeg-devel mailing list