aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kurshev <nickols_k@mail.ru>2003-02-20 16:14:12 +0000
committerNick Kurshev <nickols_k@mail.ru>2003-02-20 16:14:12 +0000
commit8f3cf0f64cc01e6a59e7b3b276316fd2c383344f (patch)
treed6e45b0719f887c5d3d004c789dd5b89d79826a2
parent20380eb831ed4a50fe456d207b5a18e51e3a3ff5 (diff)
downloadffmpeg-8f3cf0f64cc01e6a59e7b3b276316fd2c383344f.tar.gz
sync with mplayerxp. Fixes some 405.avi related flaws
Originally committed as revision 1593 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/libpostproc/postprocess.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/libavcodec/libpostproc/postprocess.c b/libavcodec/libpostproc/postprocess.c
index cf93fa8505..c03a36ed3f 100644
--- a/libavcodec/libpostproc/postprocess.c
+++ b/libavcodec/libpostproc/postprocess.c
@@ -800,6 +800,7 @@ void pp_postprocess(uint8_t * src[3], int srcStride[3],
{
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 @@ for(y=0; y<mbHeight; y++){
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<height; y++)
+ memcpy(&(dst[0][y*dstStride[0]+horz_size]), &(src[0][y*srcStride[0]+horz_size]), tail);
+ }
width = (width )>>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<height; y++)
+ {
+ memcpy(&(dst[1][y*dstStride[1]+horz_size]), &(src[1][y*srcStride[1]+horz_size]), tail);
+ memcpy(&(dst[2][y*dstStride[2]+horz_size]), &(src[2][y*srcStride[2]+horz_size]), tail);
+ }
+ }
}
else if(srcStride[1] == dstStride[1] && srcStride[2] == dstStride[2])
{