[MPlayer-dev-eng] [PATCH 2/5] vo_xv: When copying planes use the associated pitch

Alexander Strasser eclipse7 at gmx.net
Sat Jun 24 00:30:54 EEST 2017


On 2017-06-23 13:02 +0300, Ivan Kalvachev wrote:
> On 6/23/17, Ivan Kalvachev <ikalvachev at gmail.com> wrote:
> > On 6/15/17, Alexander Strasser <eclipse7 at gmx.net> wrote:
> >> This probably never mattered as the chroma planes probably always
> >> had used the same pitch value in there layouts.
> >>
> >> Signed-off-by: Alexander Strasser <eclipse7 at gmx.net>
> >> ---
> >>  libvo/vo_xv.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
> >> index a39c8d504..783e91d84 100644
> >> --- a/libvo/vo_xv.c
> >> +++ b/libvo/vo_xv.c
> >> @@ -409,7 +409,7 @@ static int draw_slice(uint8_t * image[], int
> >> stride[],
> >> int w, int h,
> >>
> >>      dst = xvimage[current_buf]->data + xvimage[current_buf]->offsets[2]
> >> +
> >>          xvimage[current_buf]->pitches[2] * y + x;
> >> -        memcpy_pic(dst, image[idx_p2], w, h,
> >> xvimage[current_buf]->pitches[1],
> >> +        memcpy_pic(dst, image[idx_p2], w, h,
> >> xvimage[current_buf]->pitches[2],
> >
> > Are you sure this shouldn't be "pitches[idx_p2]" ?
> Sorry, Ignore what I said.
> 
> It is using offsets[2] and it matches with pitches[2].
> 
> Your patch is correct.

I got confused in the same way at first. Good to see you getting to the same 
conclusion here.

Thanks for the review.

  Alexander


More information about the MPlayer-dev-eng mailing list