[vlc-commits] i420_yuy2: fix the line remaining offset for other YUY2 variants
Steve Lhomme
git at videolan.org
Wed Mar 9 13:23:27 CET 2016
vlc/vlc-2.2 | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Mar 8 16:45:21 2016 +0100| [ca6499dc716c52b3add0d99f002b2c7f343614f6] | committer: Jean-Baptiste Kempf
i420_yuy2: fix the line remaining offset for other YUY2 variants
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 597b2898f56d11281cbe9b2c64d9637afca0d7f0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=ca6499dc716c52b3add0d99f002b2c7f343614f6
---
modules/video_chroma/i420_yuy2.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c
index 74ab946..bfdb044 100644
--- a/modules/video_chroma/i420_yuy2.c
+++ b/modules/video_chroma/i420_yuy2.c
@@ -510,11 +510,14 @@ static void I420_YVYU( filter_t *p_filter, picture_t *p_source,
#endif
const int i_source_margin = p_source->p[0].i_pitch
- - p_source->p[0].i_visible_pitch;
+ - p_source->p[0].i_visible_pitch
+ - p_filter->fmt_in.video.i_x_offset;
const int i_source_margin_c = p_source->p[1].i_pitch
- - p_source->p[1].i_visible_pitch;
+ - p_source->p[1].i_visible_pitch
+ - ( p_filter->fmt_in.video.i_x_offset / 2 );
const int i_dest_margin = p_dest->p->i_pitch
- - p_dest->p->i_visible_pitch;
+ - p_dest->p->i_visible_pitch
+ - ( p_filter->fmt_out.video.i_x_offset * 2 );
#if !defined(MODULE_NAME_IS_i420_yuy2_sse2)
for( i_y = (p_filter->fmt_in.video.i_y_offset + p_filter->fmt_in.video.i_visible_height) / 2 ; i_y-- ; )
@@ -720,11 +723,14 @@ static void I420_UYVY( filter_t *p_filter, picture_t *p_source,
#endif
const int i_source_margin = p_source->p[0].i_pitch
- - p_source->p[0].i_visible_pitch;
+ - p_source->p[0].i_visible_pitch
+ - p_filter->fmt_in.video.i_x_offset;
const int i_source_margin_c = p_source->p[1].i_pitch
- - p_source->p[1].i_visible_pitch;
+ - p_source->p[1].i_visible_pitch
+ - ( p_filter->fmt_in.video.i_x_offset / 2 );
const int i_dest_margin = p_dest->p->i_pitch
- - p_dest->p->i_visible_pitch;
+ - p_dest->p->i_visible_pitch
+ - ( p_filter->fmt_out.video.i_x_offset * 2 );
#if !defined(MODULE_NAME_IS_i420_yuy2_sse2)
for( i_y = (p_filter->fmt_in.video.i_y_offset + p_filter->fmt_in.video.i_visible_height) / 2 ; i_y-- ; )
@@ -993,11 +999,14 @@ static void I420_Y211( filter_t *p_filter, picture_t *p_source,
int i_x, i_y;
const int i_source_margin = p_source->p[0].i_pitch
- - p_source->p[0].i_visible_pitch;
+ - p_source->p[0].i_visible_pitch
+ - p_filter->fmt_in.video.i_x_offset;
const int i_source_margin_c = p_source->p[1].i_pitch
- - p_source->p[1].i_visible_pitch;
+ - p_source->p[1].i_visible_pitch
+ - ( p_filter->fmt_in.video.i_x_offset / 2 );
const int i_dest_margin = p_dest->p->i_pitch
- - p_dest->p->i_visible_pitch;
+ - p_dest->p->i_visible_pitch
+ - ( p_filter->fmt_out.video.i_x_offset * 2 );
for( i_y = (p_filter->fmt_in.video.i_y_offset + p_filter->fmt_in.video.i_visible_height) / 2 ; i_y-- ; )
{
More information about the vlc-commits
mailing list