Commit 3a9ae14c authored by Sam Hocevar's avatar Sam Hocevar

* src/video_output/vout_pictures.c: support the GREY fourcc.

parent b6a01980
...@@ -572,7 +572,6 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma, ...@@ -572,7 +572,6 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma,
case FOURCC_YUY2: case FOURCC_YUY2:
case FOURCC_UYVY: case FOURCC_UYVY:
case FOURCC_J422: case FOURCC_J422:
p_format->i_bits_per_pixel = 16;
p_format->i_bits_per_pixel = 16; p_format->i_bits_per_pixel = 16;
break; break;
case FOURCC_I411: case FOURCC_I411:
...@@ -607,6 +606,11 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma, ...@@ -607,6 +606,11 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma,
case FOURCC_RGB2: case FOURCC_RGB2:
p_format->i_bits_per_pixel = 8; p_format->i_bits_per_pixel = 8;
break; break;
case FOURCC_GREY:
p_format->i_bits_per_pixel = 8;
break;
default: default:
p_format->i_bits_per_pixel = 0; p_format->i_bits_per_pixel = 0;
break; break;
...@@ -832,6 +836,15 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic, ...@@ -832,6 +836,15 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
p_pic->i_planes = 1; p_pic->i_planes = 1;
break; break;
case FOURCC_GREY:
p_pic->p->i_lines = i_height_aligned;
p_pic->p->i_visible_lines = i_height;
p_pic->p->i_pitch = i_width_aligned;
p_pic->p->i_visible_pitch = i_width;
p_pic->p->i_pixel_pitch = 1;
p_pic->i_planes = 1;
break;
default: default:
msg_Err( p_this, "unknown chroma type 0x%.8x (%4.4s)", msg_Err( p_this, "unknown chroma type 0x%.8x (%4.4s)",
i_chroma, (char*)&i_chroma ); i_chroma, (char*)&i_chroma );
......
...@@ -99,3 +99,6 @@ ...@@ -99,3 +99,6 @@
/* Palettized YUV with palette element Y:U:V:A */ /* Palettized YUV with palette element Y:U:V:A */
#define FOURCC_YUVP VLC_FOURCC('Y','U','V','P') #define FOURCC_YUVP VLC_FOURCC('Y','U','V','P')
/* Planar 8-bit grayscale */
#define FOURCC_GREY VLC_FOURCC('G','R','E','Y')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment