# HG changeset patch # User nickols_k # Date 1045757652 0 # Node ID 7f5587a7dd105e3bf2f49becf5e02b3696976c91 # Parent d90c350454da1c897db532638b9a99080d93ff37 sync with mplayerxp. Fixes some 405.avi related flaws diff -r d90c350454da -r 7f5587a7dd10 libpostproc/postprocess.c --- a/libpostproc/postprocess.c Tue Feb 18 19:10:57 2003 +0000 +++ b/libpostproc/postprocess.c Thu Feb 20 16:14:12 2003 +0000 @@ -800,6 +800,7 @@ { int mbWidth = (width+15)>>4; int mbHeight= (height+15)>>4; + int horz_size,vert_size; PPMode *mode = (PPMode*)vm; PPContext *c = (PPContext*)vc; int minStride= MAX(srcStride[0], dstStride[0]); @@ -847,18 +848,40 @@ printf("using npp filters 0x%X/0x%X\n", mode->lumMode, mode->chromMode); } + /* special case for 405.avi: (width=356)%8 !=0 */ + horz_size = (width / BLOCK_SIZE) * BLOCK_SIZE; + postProcess(src[0], srcStride[0], dst[0], dstStride[0], - width, height, QP_store, QPStride, 0, mode, c); + horz_size, height, QP_store, QPStride, 0, mode, c); + + if(horz_size < width) + { + unsigned y,tail; + tail = width-horz_size; + for(y=0; y>c->hChromaSubSample; + horz_size = (width / BLOCK_SIZE) * BLOCK_SIZE; height = (height)>>c->vChromaSubSample; if(mode->chromMode) { postProcess(src[1], srcStride[1], dst[1], dstStride[1], - width, height, QP_store, QPStride, 1, mode, c); + horz_size, height, QP_store, QPStride, 1, mode, c); postProcess(src[2], srcStride[2], dst[2], dstStride[2], - width, height, QP_store, QPStride, 2, mode, c); + horz_size, height, QP_store, QPStride, 2, mode, c); + if(horz_size < width) + { + unsigned y,tail; + tail = width-horz_size; + for(y=0; y