diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-23 00:24:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-23 00:24:46 +0100 |
commit | 2a9b9579aba598de42aad6161e3447e12ce173bc (patch) | |
tree | 4977b5fd13f04e9ad177591b6c75d7ac4701871f /libpostproc | |
parent | 330113b0328e080c7faa3c4a255be96028b1f3fe (diff) | |
download | ffmpeg-streaming-2a9b9579aba598de42aad6161e3447e12ce173bc.zip ffmpeg-streaming-2a9b9579aba598de42aad6161e3447e12ce173bc.tar.gz |
postproc/postprocess_template: Move QP initialization down
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libpostproc')
-rw-r--r-- | libpostproc/postprocess_template.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess_template.c index 447cfc6..5e51b52 100644 --- a/libpostproc/postprocess_template.c +++ b/libpostproc/postprocess_template.c @@ -3475,29 +3475,6 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ const int stride= dstStride; av_unused uint8_t *tmpXchg; - if(isColor){ - QP= QPptr[x>>qpHShift]; - c.nonBQP= nonBQPptr[x>>qpHShift]; - }else{ - QP= QPptr[x>>4]; - QP= (QP* QPCorrecture + 256*128)>>16; - c.nonBQP= nonBQPptr[x>>4]; - c.nonBQP= (c.nonBQP* QPCorrecture + 256*128)>>16; - yHistogram[ srcBlock[srcStride*12 + 4] ]++; - } - c.QP= QP; -#if TEMPLATE_PP_MMX - __asm__ volatile( - "movd %1, %%mm7 \n\t" - "packuswb %%mm7, %%mm7 \n\t" // 0, 0, 0, QP, 0, 0, 0, QP - "packuswb %%mm7, %%mm7 \n\t" // 0,QP, 0, QP, 0,QP, 0, QP - "packuswb %%mm7, %%mm7 \n\t" // QP,..., QP - "movq %%mm7, %0 \n\t" - : "=m" (c.pQPb) - : "r" (QP) - ); -#endif - #if TEMPLATE_PP_MMXEXT && HAVE_6REGS /* @@ -3546,6 +3523,28 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ RENAME(deInterlaceBlendCubic)(dstBlock, dstStride); */ + if(isColor){ + QP= QPptr[x>>qpHShift]; + c.nonBQP= nonBQPptr[x>>qpHShift]; + }else{ + QP= QPptr[x>>4]; + QP= (QP* QPCorrecture + 256*128)>>16; + c.nonBQP= nonBQPptr[x>>4]; + c.nonBQP= (c.nonBQP* QPCorrecture + 256*128)>>16; + yHistogram[ srcBlock[srcStride*12 + 4] ]++; + } + c.QP= QP; +#if TEMPLATE_PP_MMX + __asm__ volatile( + "movd %1, %%mm7 \n\t" + "packuswb %%mm7, %%mm7 \n\t" // 0, 0, 0, QP, 0, 0, 0, QP + "packuswb %%mm7, %%mm7 \n\t" // 0,QP, 0, QP, 0,QP, 0, QP + "packuswb %%mm7, %%mm7 \n\t" // QP,..., QP + "movq %%mm7, %0 \n\t" + : "=m" (c.pQPb) + : "r" (QP) + ); +#endif /* only deblock if we have 2 blocks */ if(y + 8 < height){ if(mode & V_X1_FILTER) |