changeset 36748:a31e7824ef36

Remove pointless casts and obfuscated array indexing.
author reimar
date Sat, 15 Feb 2014 17:24:29 +0000
parents f42a82d80710
children 9393c7f716f3
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sat Feb 15 17:24:28 2014 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sat Feb 15 17:24:29 2014 +0000
@@ -995,7 +995,7 @@
             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 @@
 
         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;
     }