summaryrefslogtreecommitdiffstats
path: root/dec_video.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 14:43:38 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 14:43:38 +0000
commit62d5ab65a66ce33c8b3f25809569e1cfad03ede6 (patch)
treea5f2317c2cbff2b13f1cd9cee0bf0a22e938ea68 /dec_video.c
parent4f39c63d7cef00dbc3831179dc5ed4e2872f13ec (diff)
downloadmpv-62d5ab65a66ce33c8b3f25809569e1cfad03ede6.tar.bz2
mpv-62d5ab65a66ce33c8b3f25809569e1cfad03ede6.tar.xz
ffdivx postproc dest buffer is 16x16 aligned
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2292 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r--dec_video.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/dec_video.c b/dec_video.c
index 80cf1290fc..6bea0a1929 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -519,15 +519,21 @@ if(verbose>1){
#ifdef FF_POSTPROCESS
if(lavc_pp){
// postprocess
- if(!sh_video->our_out_buffer)
- sh_video->our_out_buffer = (char*)memalign(64,sh_video->disp_w*sh_video->disp_h*3/2);
- stride[0]=sh_video->disp_w;
- stride[1]=stride[2]=sh_video->disp_w/2;
- planes[0]=sh_video->our_out_buffer;
- planes[2]=planes[0]+sh_video->disp_w*sh_video->disp_h;
- planes[1]=planes[2]+sh_video->disp_w*sh_video->disp_h/4;
+ int w=(sh_video->disp_w+15)&(~15);
+ int h=(sh_video->disp_h+15)&(~15);
+ int xoff=0; //(w-sh_video->disp_w)/2;
+ int yoff=0; //(h-sh_video->disp_h)/2;
+ if(!sh_video->our_out_buffer){
+ sh_video->our_out_buffer = (char*)memalign(64,w*h*3/2);
+ memset(sh_video->our_out_buffer,0,w*h*3/2);
+ }
+ stride[0]=w;
+ stride[1]=stride[2]=w/2;
+ planes[0]=sh_video->our_out_buffer+stride[0]*yoff+xoff;
+ planes[2]=sh_video->our_out_buffer+w*h+stride[2]*(yoff>>1)+(xoff>>1);
+ planes[1]=planes[2]+w*h/4;
postprocess(lavc_picture.data,lavc_picture.linesize[0],
- planes,sh_video->disp_w,
+ planes,stride[0],
sh_video->disp_w,sh_video->disp_h,
&quant_store[0][0],MBC+1,lavc_pp);
} else