diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2021-11-11 22:39:14 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2021-11-25 15:07:15 +0800 |
commit | 7b55f95f71559b2e76bdc6e7d6dcf12b3b5a8677 (patch) | |
tree | 5fd078c54a204d8761f8d8e3de6f619aba488b13 | |
parent | 3436864e681bfe81b9de3821e822ca636264ad65 (diff) | |
download | ffmpeg-7b55f95f71559b2e76bdc6e7d6dcf12b3b5a8677.tar.gz |
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>
-rw-r--r-- | libavformat/rtpenc.c | 2 | ||||
-rw-r--r-- | libavformat/rtpenc_rfc4175.c | 4 | ||||
-rw-r--r-- | libavformat/sdp.c | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 4f115cc77e..17f5d9d308 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -85,6 +85,7 @@ static int is_supported(enum AVCodecID id) case AV_CODEC_ID_SPEEX: case AV_CODEC_ID_OPUS: case AV_CODEC_ID_RAWVIDEO: + case AV_CODEC_ID_BITPACKED: return 1; default: return 0; @@ -620,6 +621,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) case AV_CODEC_ID_MJPEG: ff_rtp_send_jpeg(s1, pkt->data, size); break; + case AV_CODEC_ID_BITPACKED: case AV_CODEC_ID_RAWVIDEO: ff_rtp_send_raw_rfc4175 (s1, pkt->data, size); break; diff --git a/libavformat/rtpenc_rfc4175.c b/libavformat/rtpenc_rfc4175.c index 6fa34b64cb..4623b4ac23 100644 --- a/libavformat/rtpenc_rfc4175.c +++ b/libavformat/rtpenc_rfc4175.c @@ -37,6 +37,10 @@ void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size) xinc = yinc = 2; pgroup = 4; break; + case AV_PIX_FMT_YUV422P10: + xinc = yinc = 2; + pgroup = 5; + break; case AV_PIX_FMT_YUV420P: xinc = yinc = 4; pgroup = 6; diff --git a/libavformat/sdp.c b/libavformat/sdp.c index cc04d70c0d..5ad2a54474 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -660,6 +660,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int p->width, p->height, pix_fmt, config); break; } + case AV_CODEC_ID_BITPACKED: case AV_CODEC_ID_RAWVIDEO: { const char *pix_fmt; 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: pix_fmt = "YCbCr-4:2:2"; break; + case AV_PIX_FMT_YUV422P10: + pix_fmt = "YCbCr-4:2:2"; + bit_depth = 10; + break; case AV_PIX_FMT_YUV420P: pix_fmt = "YCbCr-4:2:0"; break; |