[FFmpeg-cvslog] avcodec/mlpenc: simplify compare_best_offset()

Paul B Mahol git at videolan.org
Sun Sep 5 01:29:26 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep  5 00:27:27 2021 +0200| [589cd58c858bb6b5c03cfcdb55cb8aa8acedefd7] | committer: Paul B Mahol

avcodec/mlpenc: simplify compare_best_offset()

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

 libavcodec/mlpenc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index dd5c69c250..50662de09c 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -1939,10 +1939,7 @@ static void clear_path_counter(PathCounter *path_counter)
 
 static int compare_best_offset(const BestOffset *prev, const BestOffset *cur)
 {
-    if (prev->lsb_bits != cur->lsb_bits)
-        return 1;
-
-    return 0;
+    return prev->lsb_bits != cur->lsb_bits;
 }
 
 static int best_codebook_path_cost(MLPEncodeContext *ctx, unsigned int channel,



More information about the ffmpeg-cvslog mailing list