# HG changeset patch # User michael # Date 1026821070 0 # Node ID 91373686700953eacc05c367b6ff9a61001cfd5e # Parent 8a680d5f3a17512e3500e842e5def52cc79dac71 10l y422p -> y420p use uvstride in draw_slices dr2 support (disabled as mplayer doesnt like slices with width!=picture width sometimes) diff -r 8a680d5f3a17 -r 913736867009 libmpcodecs/vd_ffmpeg.c --- 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 || 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){