diff mbox

[FFmpeg-devel] avfilter/allfilters: Prefer s32 format over float

Message ID 20170308130947.123488-1-margtu-fivt@ya.ru
State New
Headers show

Commit Message

Aleksey Vasenev March 8, 2017, 1:09 p.m. UTC
Because float actually int24 in the range [-1, 1]

Signed-off-by: Aleksey Vasenev <margtu-fivt@ya.ru>
---
 libavfilter/avfiltergraph.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Moritz Barsnick March 10, 2017, 10:05 a.m. UTC | #1
> Because float actually int24 in the range [-1, 1]

This sentence is missing a verb and possibly an adverb or adjective. I
don't understand the point. ;-)

Moritz
diff mbox

Patch

diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 534c6701a8..61c10eeecd 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -648,11 +648,11 @@  static int get_fmt_score(enum AVSampleFormat dst_fmt, enum AVSampleFormat src_fm
 
     if (av_get_packed_sample_fmt(dst_fmt) == AV_SAMPLE_FMT_S32 &&
         av_get_packed_sample_fmt(src_fmt) == AV_SAMPLE_FMT_FLT)
-        score += 20;
+        score += 2;
 
     if (av_get_packed_sample_fmt(dst_fmt) == AV_SAMPLE_FMT_FLT &&
         av_get_packed_sample_fmt(src_fmt) == AV_SAMPLE_FMT_S32)
-        score += 2;
+        score += 20;
 
     return score;
 }