[vlc-devel] [vlc-commits] picture: round the number of visible lines to the upper multiple

Tristan Matthews tmatth at videolan.org
Mon Apr 16 16:56:34 CEST 2018


On Mon, Apr 16, 2018 at 10:38 AM, Steve Lhomme <git at videolan.org> wrote:
> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Apr 16 15:35:23 2018 +0200| [82f649983443292bd893962cac0484b7df8d1c89] | committer: Steve Lhomme
>
> picture: round the number of visible lines to the upper multiple

This breaks make check for me:

FAIL: chroma_copy_sse_test
==========================

testing: 1 x 1 (vis: 1 x 1) NV12 -> I420
testing: 1 x 1 (vis: 1 x 1) NV12 -> NV12
testing: 3 x 3 (vis: 3 x 3) NV12 -> I420
error: pixel doesn't match @ plane: 1: 0 x 1: 0x0 vs 0xF1
chroma_copy_sse_test: video_chroma/copy.c:1050: piccheck: Assertion
`!"error: pixel doesn't match"' failed.
FAIL chroma_copy_sse_test (exit status: 134)

FAIL: chroma_copy_test
======================

testing: 1 x 1 (vis: 1 x 1) NV12 -> I420
testing: 1 x 1 (vis: 1 x 1) NV12 -> NV12
testing: 3 x 3 (vis: 3 x 3) NV12 -> I420
error: pixel doesn't match @ plane: 1: 0 x 1: 0x0 vs 0xF1
chroma_copy_test: video_chroma/copy.c:1050: piccheck: Assertion
`!"error: pixel doesn't match"' failed.
FAIL chroma_copy_test (exit status: 134)


>
> The U/V lines of 4:2:0 chroma are divided by 2. But if the height is an odd
> number we end up missing the last line for these planes.
>
> Fixes #20290
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=82f649983443292bd893962cac0484b7df8d1c89
> ---
>
>  src/misc/picture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/misc/picture.c b/src/misc/picture.c
> index 7506e47725..35c245e728 100644
> --- a/src/misc/picture.c
> +++ b/src/misc/picture.c
> @@ -159,7 +159,7 @@ int picture_Setup( picture_t *p_picture, const video_format_t *restrict fmt )
>          assert(w->den >= w->num);
>
>          p->i_lines = height * h->num / h->den;
> -        p->i_visible_lines = fmt->i_visible_height * h->num / h->den;
> +        p->i_visible_lines = (fmt->i_visible_height + (h->den - 1)) * h->num / h->den;
>
>          p->i_pitch = width * w->num / w->den * p_dsc->pixel_size;
>          p->i_visible_pitch = fmt->i_visible_width * w->num / w->den
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits


More information about the vlc-devel mailing list