[vlc-devel] [PATCH 11/15] yuv: use the source visible area to shift pixels
Steve Lhomme
robux4 at ycbcr.xyz
Thu Sep 3 08:26:55 CEST 2020
On 2020-09-03 7:52, Steve Lhomme wrote:
> The values are always the same as in the output format.
In fact they are not, because of video_format_ApplyRotation(). So this
patch is wrong.
Dynamic cropping/AR is not handled and pretends to the core that it
does, so it's probably broken. It should probably return an error when
that happens and handle RESET_PICTURES. Then a conversion filter to
match the original format will be added.
> They may change if the cropping changes, which will break the YUV output.
> ---
> modules/video_output/yuv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
> index f5789cce28e..2ff32883e53 100644
> --- a/modules/video_output/yuv.c
> +++ b/modules/video_output/yuv.c
> @@ -231,8 +231,8 @@ static void Display(vout_display_t *vd, picture_t *picture)
> const plane_t *plane = &picture->p[i];
> const uint8_t *pixels = plane->p_pixels;
>
> - pixels += (vd->fmt->i_x_offset * plane->i_visible_pitch)
> - / vd->fmt->i_visible_height;
> + pixels += (vd->source->i_x_offset * plane->i_visible_pitch)
> + / vd->source->i_visible_height;
>
> for( int y = 0; y < plane->i_visible_lines; y++) {
> const size_t written = fwrite(pixels, 1, plane->i_visible_pitch,
> --
> 2.26.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list