[vlc-devel] commit: Correctly handle YUV 422 packed in ripple and wave ( Antoine Cellerier )
git version control
git at videolan.org
Mon Jan 4 23:46:19 CET 2010
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Mon Jan 4 23:38:34 2010 +0100| [b998f491d1958f0121492ec87c7fa9fc682d6c54] | committer: Antoine Cellerier
Correctly handle YUV 422 packed in ripple and wave
It's a bit blocky but a lot easier than a pixel perfect fix.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b998f491d1958f0121492ec87c7fa9fc682d6c54
---
modules/video_filter/ripple.c | 12 ++++++++++--
modules/video_filter/wave.c | 7 +++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/modules/video_filter/ripple.c b/modules/video_filter/ripple.c
index a8ce70f..55d7862 100644
--- a/modules/video_filter/ripple.c
+++ b/modules/video_filter/ripple.c
@@ -143,7 +143,15 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
i_num_lines = p_pic->p[i_index].i_visible_lines;
i_pixel_pitch = p_pic->p[i_index].i_pixel_pitch;
- i_visible_pixels = p_pic->p[i_index].i_visible_pitch/p_pic->p[i_index].i_pixel_pitch;
+ switch( p_filter->fmt_in.video.i_chroma )
+ {
+ CASE_PACKED_YUV_422
+ // Quick hack to fix u/v inversion occuring with 2 byte pixel pitch
+ i_pixel_pitch *= 2;
+ break;
+ }
+
+ i_visible_pixels = p_pic->p[i_index].i_visible_pitch/i_pixel_pitch;
i_first_line = i_num_lines * 4 / 5;
@@ -167,7 +175,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
- i_first_line) )
* (double)(i_line - i_first_line)
/ (double)i_num_lines
- / 8.0 )*p_pic->p[i_index].i_pixel_pitch;
+ / 8.0 )*i_pixel_pitch;
if( i_offset )
{
diff --git a/modules/video_filter/wave.c b/modules/video_filter/wave.c
index 0c28123..6ad3ac2 100644
--- a/modules/video_filter/wave.c
+++ b/modules/video_filter/wave.c
@@ -145,6 +145,13 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
i_num_lines = p_pic->p[i_index].i_visible_lines;
i_visible_pitch = p_pic->p[i_index].i_visible_pitch;
i_pixel_pitch = p_pic->p[i_index].i_pixel_pitch;
+ switch( p_filter->fmt_in.video.i_chroma )
+ {
+ CASE_PACKED_YUV_422
+ // Quick hack to fix u/v inversion occuring with 2 byte pixel pitch
+ i_pixel_pitch *= 2;
+ break;
+ }
i_visible_pixels = i_visible_pitch/i_pixel_pitch;
black_pixel = ( p_pic->i_planes > 1 && i_index == Y_PLANE ) ? 0x00
More information about the vlc-devel
mailing list