mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat: suppport YUV 4:2:2 10-bit for rfc4175
Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
3436864e68
commit
7b55f95f71
@ -85,6 +85,7 @@ static int is_supported(enum AVCodecID id)
|
|||||||
case AV_CODEC_ID_SPEEX:
|
case AV_CODEC_ID_SPEEX:
|
||||||
case AV_CODEC_ID_OPUS:
|
case AV_CODEC_ID_OPUS:
|
||||||
case AV_CODEC_ID_RAWVIDEO:
|
case AV_CODEC_ID_RAWVIDEO:
|
||||||
|
case AV_CODEC_ID_BITPACKED:
|
||||||
return 1;
|
return 1;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
@ -620,6 +621,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
|
|||||||
case AV_CODEC_ID_MJPEG:
|
case AV_CODEC_ID_MJPEG:
|
||||||
ff_rtp_send_jpeg(s1, pkt->data, size);
|
ff_rtp_send_jpeg(s1, pkt->data, size);
|
||||||
break;
|
break;
|
||||||
|
case AV_CODEC_ID_BITPACKED:
|
||||||
case AV_CODEC_ID_RAWVIDEO:
|
case AV_CODEC_ID_RAWVIDEO:
|
||||||
ff_rtp_send_raw_rfc4175 (s1, pkt->data, size);
|
ff_rtp_send_raw_rfc4175 (s1, pkt->data, size);
|
||||||
break;
|
break;
|
||||||
|
@ -37,6 +37,10 @@ void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size)
|
|||||||
xinc = yinc = 2;
|
xinc = yinc = 2;
|
||||||
pgroup = 4;
|
pgroup = 4;
|
||||||
break;
|
break;
|
||||||
|
case AV_PIX_FMT_YUV422P10:
|
||||||
|
xinc = yinc = 2;
|
||||||
|
pgroup = 5;
|
||||||
|
break;
|
||||||
case AV_PIX_FMT_YUV420P:
|
case AV_PIX_FMT_YUV420P:
|
||||||
xinc = yinc = 4;
|
xinc = yinc = 4;
|
||||||
pgroup = 6;
|
pgroup = 6;
|
||||||
|
@ -660,6 +660,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int
|
|||||||
p->width, p->height, pix_fmt, config);
|
p->width, p->height, pix_fmt, config);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case AV_CODEC_ID_BITPACKED:
|
||||||
case AV_CODEC_ID_RAWVIDEO: {
|
case AV_CODEC_ID_RAWVIDEO: {
|
||||||
const char *pix_fmt;
|
const char *pix_fmt;
|
||||||
int bit_depth = 8;
|
int bit_depth = 8;
|
||||||
@ -668,6 +669,10 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int
|
|||||||
case AV_PIX_FMT_UYVY422:
|
case AV_PIX_FMT_UYVY422:
|
||||||
pix_fmt = "YCbCr-4:2:2";
|
pix_fmt = "YCbCr-4:2:2";
|
||||||
break;
|
break;
|
||||||
|
case AV_PIX_FMT_YUV422P10:
|
||||||
|
pix_fmt = "YCbCr-4:2:2";
|
||||||
|
bit_depth = 10;
|
||||||
|
break;
|
||||||
case AV_PIX_FMT_YUV420P:
|
case AV_PIX_FMT_YUV420P:
|
||||||
pix_fmt = "YCbCr-4:2:0";
|
pix_fmt = "YCbCr-4:2:0";
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user