mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 04:30:02 +00:00
Add yvu410 as a supported v4l2 input format.
This commit is contained in:
parent
fdec49cbe8
commit
fdbe7628a9
@ -140,6 +140,7 @@ static struct fmt_map fmt_conversion_table[] = {
|
||||
{ AV_PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY },
|
||||
{ AV_PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },
|
||||
{ AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 },
|
||||
{ AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU410 },
|
||||
{ AV_PIX_FMT_RGB555LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 },
|
||||
{ AV_PIX_FMT_RGB555BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555X },
|
||||
{ AV_PIX_FMT_RGB565LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 },
|
||||
@ -944,6 +945,8 @@ static int v4l2_read_header(AVFormatContext *s1)
|
||||
avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
|
||||
if (desired_format == V4L2_PIX_FMT_YVU420)
|
||||
st->codec->codec_tag = MKTAG('Y', 'V', '1', '2');
|
||||
else if (desired_format == V4L2_PIX_FMT_YVU410)
|
||||
st->codec->codec_tag = MKTAG('Y', 'V', 'U', '9');
|
||||
st->codec->width = s->width;
|
||||
st->codec->height = s->height;
|
||||
st->codec->bit_rate = s->frame_size * av_q2d(st->avg_frame_rate) * 8;
|
||||
|
Loading…
Reference in New Issue
Block a user