Re: [FFmpeg-devel] [PATCH 4/5] ffmpeg: keep bitdepth where possible

2014-08-20 Thread Christophe Gisquet
Hi, 2014-08-20 10:10 GMT+02:00 Christophe Gisquet : > +if (!(av_get_pix_fmt_loss(enc_ctx->pix_fmt, > dec_ctx->pix_fmt, 0) > + & (FF_LOSS_DEPTH|FF_LOSS_COLORSPACE|FF_LOSS_CHROMA))) { If it was ever useful, this is probably wrong and should rather use AVPixFmtD

[FFmpeg-devel] [PATCH 4/5] ffmpeg: keep bitdepth where possible

2014-08-20 Thread Christophe Gisquet
Thanks to av_get_pix_fmt_loss, we can determine more precisely if a conversion will incur some kind of loss. If this loss doesn't modify in particular bitdepth, the input bitdepth can be reused for the output. --- ffmpeg.c | 9 + 1 file changed, 9 insertions(+) diff --git a/ffmpeg.c b/ffm