[MPlayer-cvslog] r36844 - trunk/libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Sat Feb 15 18:24:29 CET 2014


Author: reimar
Date: Sat Feb 15 18:24:29 2014
New Revision: 36844

Log:
Remove pointless casts and obfuscated array indexing.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Sat Feb 15 18:24:28 2014	(r36843)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sat Feb 15 18:24:29 2014	(r36844)
@@ -995,7 +995,7 @@ static mp_image_t *decode(sh_video_t *sh
             int8_t *q = av_frame_get_qp_table(pic, &qstride, &dummy);
             for(y = 0; y < h; y++) {
                 for(x = 0; x < w; x++)
-                    quality += (double)*(q+x);
+                    quality += q[x];
                 q += qstride;
             }
             quality /= w * h;
@@ -1028,7 +1028,7 @@ static mp_image_t *decode(sh_video_t *sh
 
         ctx->qp_stat[(int)(quality+0.5)]++;
         ctx->qp_sum += quality;
-        ctx->inv_qp_sum += 1.0/(double)FFMAX(quality, 1);
+        ctx->inv_qp_sum += 1.0/FFMAX(quality, 1);
 
         break;
     }


More information about the MPlayer-cvslog mailing list