[FFmpeg-cvslog] fdctdsp: cosmetics: Drop one unnecessary if-block level

Diego Biurrun git at videolan.org
Thu Sep 4 19:17:33 CEST 2014


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Thu Aug 28 12:49:38 2014 -0700| [2b8b0da09cf0dc2535de42f95110eb633f36d8c8] | committer: Diego Biurrun

fdctdsp: cosmetics: Drop one unnecessary if-block level

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

 libavcodec/fdctdsp.c |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/libavcodec/fdctdsp.c b/libavcodec/fdctdsp.c
index b245198..696fa01 100644
--- a/libavcodec/fdctdsp.c
+++ b/libavcodec/fdctdsp.c
@@ -30,17 +30,15 @@ av_cold void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx)
     if (avctx->bits_per_raw_sample == 10) {
         c->fdct    = ff_jpeg_fdct_islow_10;
         c->fdct248 = ff_fdct248_islow_10;
+    } else if (avctx->dct_algo == FF_DCT_FASTINT) {
+        c->fdct    = ff_fdct_ifast;
+        c->fdct248 = ff_fdct_ifast248;
+    } else if (avctx->dct_algo == FF_DCT_FAAN) {
+        c->fdct    = ff_faandct;
+        c->fdct248 = ff_faandct248;
     } else {
-        if (avctx->dct_algo == FF_DCT_FASTINT) {
-            c->fdct    = ff_fdct_ifast;
-            c->fdct248 = ff_fdct_ifast248;
-        } else if (avctx->dct_algo == FF_DCT_FAAN) {
-            c->fdct    = ff_faandct;
-            c->fdct248 = ff_faandct248;
-        } else {
-            c->fdct    = ff_jpeg_fdct_islow_8; // slow/accurate/default
-            c->fdct248 = ff_fdct248_islow_8;
-        }
+        c->fdct    = ff_jpeg_fdct_islow_8; // slow/accurate/default
+        c->fdct248 = ff_fdct248_islow_8;
     }
 
     if (ARCH_PPC)



More information about the ffmpeg-cvslog mailing list