]> git.sesse.net Git - vlc/commitdiff
core chroma: Add support for YUV440 and YUVJ440. These are a rotated version of YUV42...
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 20 Aug 2008 13:56:19 +0000 (15:56 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 20 Aug 2008 13:56:19 +0000 (15:56 +0200)
src/video_output/vout_pictures.c
src/video_output/vout_pictures.h

index 55895f756c99b62e481215e75984058d65ae09b1..2f5d6ff3d50303fd37c98d726e5e84760f940191 100644 (file)
@@ -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;
index cdae378d7e12be562b3d94fc8de98d9dbfdadcf9..456f3102a8942cae356890473350a19608d89279 100644 (file)
 #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')