[vlc-devel] commit: core chroma: Add support for YUV440 and YUVJ440. These are a rotated version of YUV422 and used with rotated JPEGs mostly. (Derk-Jan Hartman )
git version control
git at videolan.org
Wed Aug 20 15:54:43 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Wed Aug 20 15:56:19 2008 +0200| [6702c30413175ff91adcf4cfb9585134d1ab7213] | committer: Derk-Jan Hartman
core chroma: Add support for YUV440 and YUVJ440. These are a rotated version of YUV422 and used with rotated JPEGs mostly.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6702c30413175ff91adcf4cfb9585134d1ab7213
---
src/video_output/vout_pictures.c | 37 +++++++++++++++++++++++++++++--------
src/video_output/vout_pictures.h | 4 ++++
2 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c
index 55895f7..2f5d6ff 100644
--- a/src/video_output/vout_pictures.c
+++ b/src/video_output/vout_pictures.c
@@ -602,6 +602,10 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma,
case FOURCC_J422:
p_format->i_bits_per_pixel = 16;
break;
+ case FOURCC_I440:
+ case FOURCC_J440:
+ p_format->i_bits_per_pixel = 16;
+ break;
case FOURCC_I411:
case FOURCC_YV12:
case FOURCC_I420:
@@ -727,12 +731,12 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
- p_pic->p[ U_PLANE ].i_lines = i_height_aligned / 2;
- p_pic->p[ U_PLANE ].i_visible_lines = i_height / 2;
+ p_pic->p[ U_PLANE ].i_lines = i_height_aligned;
+ p_pic->p[ U_PLANE ].i_visible_lines = i_height;
p_pic->p[ U_PLANE ].i_pitch = i_width_aligned / 2;
p_pic->p[ U_PLANE ].i_visible_pitch = i_width / 2;
- p_pic->p[ V_PLANE ].i_lines = i_height_aligned / 2;
- p_pic->p[ V_PLANE ].i_visible_lines = i_height / 2;
+ p_pic->p[ V_PLANE ].i_lines = i_height_aligned;
+ p_pic->p[ V_PLANE ].i_visible_lines = i_height;
p_pic->p[ V_PLANE ].i_pitch = i_width_aligned / 2;
p_pic->p[ V_PLANE ].i_visible_pitch = i_width / 2;
p_pic->i_planes = 3;
@@ -744,17 +748,34 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
- p_pic->p[ U_PLANE ].i_lines = i_height_aligned;
- p_pic->p[ U_PLANE ].i_visible_lines = i_height;
+ p_pic->p[ U_PLANE ].i_lines = i_height_aligned / 2;
+ p_pic->p[ U_PLANE ].i_visible_lines = i_height / 2;
p_pic->p[ U_PLANE ].i_pitch = i_width_aligned / 2;
p_pic->p[ U_PLANE ].i_visible_pitch = i_width / 2;
- p_pic->p[ V_PLANE ].i_lines = i_height_aligned;
- p_pic->p[ V_PLANE ].i_visible_lines = i_height;
+ p_pic->p[ V_PLANE ].i_lines = i_height_aligned / 2;
+ p_pic->p[ V_PLANE ].i_visible_lines = i_height / 2;
p_pic->p[ V_PLANE ].i_pitch = i_width_aligned / 2;
p_pic->p[ V_PLANE ].i_visible_pitch = i_width / 2;
p_pic->i_planes = 3;
break;
+ case FOURCC_I440:
+ case FOURCC_J440:
+ p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
+ p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
+ p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
+ p_pic->p[ Y_PLANE ].i_visible_pitch = i_width;
+ p_pic->p[ U_PLANE ].i_lines = i_height_aligned / 2;
+ p_pic->p[ U_PLANE ].i_visible_lines = i_height / 2;
+ p_pic->p[ U_PLANE ].i_pitch = i_width_aligned;
+ p_pic->p[ U_PLANE ].i_visible_pitch = i_width;
+ p_pic->p[ V_PLANE ].i_lines = i_height_aligned / 2;
+ p_pic->p[ V_PLANE ].i_visible_lines = i_height / 2;
+ p_pic->p[ V_PLANE ].i_pitch = i_width_aligned;
+ p_pic->p[ V_PLANE ].i_visible_pitch = i_width;
+ p_pic->i_planes = 3;
+ break;
+
case FOURCC_I444:
case FOURCC_J444:
p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
diff --git a/src/video_output/vout_pictures.h b/src/video_output/vout_pictures.h
index cdae378..456f310 100644
--- a/src/video_output/vout_pictures.h
+++ b/src/video_output/vout_pictures.h
@@ -90,6 +90,10 @@
#define FOURCC_I422 VLC_FOURCC('I','4','2','2')
#define FOURCC_J422 VLC_FOURCC('J','4','2','2')
+/* Planar 4:4:0, Y:U:V */
+#define FOURCC_I440 VLC_FOURCC('I','4','4','0')
+#define FOURCC_J440 VLC_FOURCC('J','4','4','0')
+
/* Planar 4:4:4, Y:U:V */
#define FOURCC_I444 VLC_FOURCC('I','4','4','4')
#define FOURCC_J444 VLC_FOURCC('J','4','4','4')
More information about the vlc-devel
mailing list