[FFmpeg-cvslog] postproc: fix qp count

Michael Niedermayer git at videolan.org
Fri Nov 28 20:02:29 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 13 16:02:42 2014 +0200| [95fa91d97525b9064d7d0b5e7ec03112e9f8a729] | committer: Michael Niedermayer

postproc: fix qp count

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 0b7e5d0d75e7d8762dd04d35f8c0821736164372)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libpostproc/postprocess.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index fb18776..8e5b043 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -975,7 +975,7 @@ void  pp_postprocess(const uint8_t * src[3], const int srcStride[3],
 
     if(pict_type & PP_PICT_TYPE_QP2){
         int i;
-        const int count= mbHeight * absQPStride;
+        const int count= FFMAX(mbHeight * absQPStride, mbWidth);
         for(i=0; i<(count>>2); i++){
             ((uint32_t*)c->stdQPTable)[i] = (((const uint32_t*)QP_store)[i]>>1) & 0x7F7F7F7F;
         }
@@ -1000,7 +1000,7 @@ void  pp_postprocess(const uint8_t * src[3], const int srcStride[3],
     if((pict_type&7)!=3){
         if (QPStride >= 0){
             int i;
-            const int count= mbHeight * FFMAX(QPStride, mbWidth);
+            const int count= FFMAX(mbHeight * QPStride, mbWidth);
             for(i=0; i<(count>>2); i++){
                 ((uint32_t*)c->nonBQPTable)[i] = ((const uint32_t*)QP_store)[i] & 0x3F3F3F3F;
             }



More information about the ffmpeg-cvslog mailing list