Commit 4966a9cd authored by gbazin's avatar gbazin
Browse files

* modules/codec/ffmpeg/ffmpeg.c, src/video_output/vout_pictures.c: fixed JPEG encoding.

parent 49391dc9
......@@ -345,10 +345,13 @@ static struct
/* Planar YUV formats */
{ VLC_FOURCC('Y','U','V','A'), PIX_FMT_YUV444P }, /* Hack */
{ VLC_FOURCC('I','4','4','4'), PIX_FMT_YUV444P },
{ VLC_FOURCC('J','4','4','4'), PIX_FMT_YUVJ444P },
{ VLC_FOURCC('I','4','2','2'), PIX_FMT_YUV422P },
{ VLC_FOURCC('J','4','2','2'), PIX_FMT_YUVJ422P },
{ VLC_FOURCC('I','4','2','0'), PIX_FMT_YUV420P },
{ VLC_FOURCC('Y','V','1','2'), PIX_FMT_YUV420P },
{ VLC_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P },
{ VLC_FOURCC('J','4','2','0'), PIX_FMT_YUVJ420P },
{ VLC_FOURCC('I','4','1','1'), PIX_FMT_YUV411P },
{ VLC_FOURCC('I','4','1','0'), PIX_FMT_YUV410P },
{ VLC_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P },
......
......@@ -572,17 +572,20 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma,
p_format->i_bits_per_pixel = 32;
break;
case FOURCC_I444:
case FOURCC_J444:
p_format->i_bits_per_pixel = 24;
break;
case FOURCC_I422:
case FOURCC_YUY2:
case FOURCC_UYVY:
case FOURCC_J422:
p_format->i_bits_per_pixel = 16;
p_format->i_bits_per_pixel = 16;
break;
case FOURCC_I411:
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_J420:
case FOURCC_IYUV:
p_format->i_bits_per_pixel = 12;
break;
......@@ -691,6 +694,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_IYUV:
case FOURCC_J420:
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;
......@@ -707,6 +711,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
break;
case FOURCC_I422:
case FOURCC_J422:
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;
......@@ -723,6 +728,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
break;
case FOURCC_I444:
case FOURCC_J444:
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;
......
......@@ -47,6 +47,7 @@
/* Planar YUV 4:2:0, Y:U:V */
#define FOURCC_I420 VLC_FOURCC('I','4','2','0')
#define FOURCC_IYUV VLC_FOURCC('I','Y','U','V')
#define FOURCC_J420 VLC_FOURCC('J','4','2','0')
/* Planar YUV 4:2:0, Y:V:U */
#define FOURCC_YV12 VLC_FOURCC('Y','V','1','2')
......@@ -84,9 +85,11 @@
/* Planar 4:2:2, Y:U:V */
#define FOURCC_I422 VLC_FOURCC('I','4','2','2')
#define FOURCC_J422 VLC_FOURCC('J','4','2','2')
/* 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')
/* Planar 4:4:4:4 Y:U:V:A */
#define FOURCC_YUVA VLC_FOURCC('Y','U','V','A')
......
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