postproc: Removed unecessary if/else branch when getting QP.
authorTucker DiNapoli <T.DiNapoli42@gmail.com>
Fri, 27 Mar 2015 20:51:43 +0000 (16:51 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 28 Mar 2015 00:49:12 +0000 (01:49 +0100)
There's still an if, as QP needs to be modified if isColor=0, but it
still removes a unecessary branch.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libpostproc/postprocess_template.c

index 4016b08..16e441a 100644 (file)
@@ -3529,16 +3529,12 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
 
           for(x = startx; x < endx; x+=BLOCK_SIZE){
             const int stride= dstStride;
-
-            if(isColor){
-                QP= QPptr[x>>qpHShift];
-                c.nonBQP= nonBQPptr[x>>qpHShift];
-            }else{
-                QP= QPptr[x>>4];
+            QP = QPptr[x>>qpHShift];
+            c.nonBQP = nonBQPptr[x>>qpHShift];
+            if(!isColor){
                 QP= (QP* QPCorrecture + 256*128)>>16;
-                c.nonBQP= nonBQPptr[x>>4];
                 c.nonBQP= (c.nonBQP* QPCorrecture + 256*128)>>16;
-                yHistogram[ srcBlock[srcStride*12 + 4] ]++;
+                yHistogram[srcBlock[srcStride*12 + 4]]++;
             }
             c.QP= QP;
 #if TEMPLATE_PP_MMX