Rémi Denis-Courmont pushed to branch 3.0.x at VideoLAN / VLC


Commits:
b82adb05 by Rémi Denis-Courmont at 2022-06-02T19:25:20+03: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.

(cherry picked from commit 87733c5011912e3f46e48948b0fe116b72bfa83f)

- - - - -


1 changed file:

- modules/video_splitter/wall.c


Changes:

=====================================
modules/video_splitter/wall.c
=====================================
@@ -416,7 +416,7 @@ static int Filter( video_splitter_t *p_splitter, picture_t 
*pp_dst[], picture_t
                 const int i_y = p_output->i_top  * p->i_visible_pitch / 
p0->i_visible_pitch;
                 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;
             }
             picture_Copy( p_dst, &tmp );
         }



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

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


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to