[vlc-commits] [Git][videolan/vlc][master] wall: fix non-first abscissa of non-8-bit samples

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Thu Jun 2 16:14:48 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
87733c50 by Rémi Denis-Courmont at 2022-06-02T15:46:20+00:00
wall: fix non-first abscissa of non-8-bit samples

The X and Y values are pixel coordinates in the potentially subsampled
plane resolution. This must be converted to an octet offset as the type
of the pixel plane pointer is pointer-to-uint8_t.

So the X value must be multiplied by the sample size. The current code
was instead rounding the value down to a multiple of the sample size.

Bug reported by Philipp Marek on IRC.

- - - - -


1 changed file:

- modules/video_splitter/wall.c


Changes:

=====================================
modules/video_splitter/wall.c
=====================================
@@ -276,8 +276,7 @@ static int Filter( video_splitter_t *p_splitter, picture_t *pp_dst[], picture_t
                 const int i_x = p_output->i_left * p.i_visible_lines
                                                    / p0->i_visible_lines;
 
-                p.p_pixels += i_y * p.i_pitch
-                               + (i_x - (i_x % p.i_pixel_pitch));
+                p.p_pixels += i_y * p.i_pitch + i_x * p.i_pixel_pitch;
                 plane_CopyPixels(p_dst->p + i, &p);
             }
             picture_CopyProperties(p_dst, p_src);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/87733c5011912e3f46e48948b0fe116b72bfa83f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/87733c5011912e3f46e48948b0fe116b72bfa83f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list