diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-07-15 21:33:46 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-07-15 21:33:46 +0000 |
commit | 5358f5a60fec79a9e14e1b09e51558709834f047 (patch) | |
tree | ac3a19d2e29a36fe04910bee0609b18e4c60df44 /libmpcodecs/vd_ffmpeg.c | |
parent | 8c6996f712e78addbbb9c6fc0576771335e05480 (diff) | |
download | mpv-5358f5a60fec79a9e14e1b09e51558709834f047.tar.bz2 mpv-5358f5a60fec79a9e14e1b09e51558709834f047.tar.xz |
svq1 direct rendering
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6739 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_ffmpeg.c')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 93c4a3e0c6..fa99a596ca 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -251,7 +251,11 @@ static void get_buffer(struct AVCodecContext *avctx, int width, int height, int // int flags= MP_IMGFLAG_ALIGNED_STRIDE; int flags= MP_IMGFLAG_ACCEPT_STRIDE; int type= MP_IMGTYPE_IPB; - + int align=15; + + if(avctx->pix_fmt == PIX_FMT_YUV410P) + align=63; //yes seriously, its really needed (16x16 chroma blocks in SVQ1 -> 64x64) + if(init_vo(sh)<0){ printf("init_vo failed\n"); return; @@ -273,8 +277,7 @@ static void get_buffer(struct AVCodecContext *avctx, int width, int height, int mp_msg(MSGT_DECVIDEO,MSGL_DBG2, type== MP_IMGTYPE_IPB ? "using IPB\n" : "using IP\n"); mpi= mpcodecs_get_image(sh,type, flags, -// MN: arpi, is the next line ok? (i doubt it), its needed for height%16!=0 files - (width+15)&(~15), (height+15)&(~15)); + (width+align)&(~align), (height+align)&(~align)); // ok, lets see what did we get: if( mpi->flags&MP_IMGFLAG_DRAW_CALLBACK && @@ -338,7 +341,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ &got_picture, data, len); if(ret<0) mp_msg(MSGT_DECVIDEO,MSGL_WARN, "Error while decoding frame!\n"); if(!got_picture) return NULL; // skipped image - + if(init_vo(sh)<0) return NULL; #if LIBAVCODEC_BUILD > 4615 |