Mercurial > mplayer.hg
changeset 6740:913736867009
10l y422p -> y420p
use uvstride in draw_slices
dr2 support (disabled as mplayer doesnt like slices with width!=picture width sometimes)
author | michael |
---|---|
date | Tue, 16 Jul 2002 12:04:30 +0000 |
parents | 8a680d5f3a17 |
children | 65f26506053d |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 32 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Tue Jul 16 00:56:12 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Tue Jul 16 12:04:30 2002 +0000 @@ -83,8 +83,8 @@ case IMGFMT_YV12: case IMGFMT_IYUV: case IMGFMT_I420: - if(ctx->yuy2_support || ctx->yvu9_support) return CONTROL_FALSE; - else return CONTROL_TRUE; + if(ctx->yvu9_support) return CONTROL_FALSE; + else return CONTROL_TRUE; case IMGFMT_YUY2: if(ctx->yuy2_support) return CONTROL_TRUE; return CONTROL_FALSE; @@ -216,11 +216,38 @@ int y, int width, int height){ sh_video_t * sh = s->opaque; int stride[3]; + int start=0, i; + int skip_stride= (s->width+15)>>4; + UINT8 *skip= &s->mbskip_table[(y>>4)*skip_stride]; +#if LIBAVCODEC_BUILD > 4615 + int threshold= s->pict_type==B_TYPE ? -99 : s->dr_ip_buffer_count; +#endif stride[0]=linesize; - stride[1]=stride[2]=stride[0]/2; - - mpcodecs_draw_slice (sh,src, stride, width, height, 0, y); +#if LIBAVCODEC_BUILD > 4615 + if(s->dr_uvstride) + stride[1]=stride[2]= s->dr_uvstride; + else +#endif + stride[1]=stride[2]=stride[0]/2; +#if 0 + if(s->pict_type!=B_TYPE){ + for(i=0; i*16<width+16; i++){ + if(i*16>=width || skip[i]>=threshold){ + if(start==i) start++; + else{ + UINT8 *src2[3]= {src[0] + start*16, + src[1] + start*8, + src[2] + start*8}; +//printf("%2d-%2d x %d\n", start, i, y); + mpcodecs_draw_slice (sh,src2, stride, (i-start)*16, height, start*16, y); + start= i+1; + } + } + } + }else +#endif + mpcodecs_draw_slice (sh,src, stride, width, height, 0, y); } static int init_vo(sh_video_t *sh){