[FFmpeg-cvslog] ffmpeg: fix dither to 24bit PCM output

Michael Niedermayer git at videolan.org
Tue Jan 8 20:42:15 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jan  8 17:17:31 2013 +0100| [a260c79733702ebcfb3d14d93cac10ae433ef03a] | committer: Michael Niedermayer

ffmpeg: fix dither to 24bit PCM output

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a260c79733702ebcfb3d14d93cac10ae433ef03a
---

 ffmpeg_opt.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 63e3de9..38ffd42 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1014,6 +1014,8 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
     av_opt_get_int   (o->g->swr_opts, "filter_type"  , 0, &ost->swr_filter_type);
     av_opt_get_int   (o->g->swr_opts, "dither_method", 0, &ost->swr_dither_method);
     av_opt_get_double(o->g->swr_opts, "dither_scale" , 0, &ost->swr_dither_scale);
+    if (ost->enc && av_get_exact_bits_per_sample(ost->enc->id) == 24)
+        ost->swr_dither_scale = ost->swr_dither_scale*256;
 
     ost->source_index = source_index;
     if (source_index >= 0) {



More information about the ffmpeg-cvslog mailing list