mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-01 04:12:14 +00:00
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: lavc/x264: Support bgr0 as input pix_fmt. lavf: Use av_codec_get_tag2() in avformat_query_codec(). Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
b06e82e738
@ -148,6 +148,7 @@ static int avfmt2_num_planes(int avfmt)
|
||||
case AV_PIX_FMT_YUV444P:
|
||||
return 3;
|
||||
|
||||
case AV_PIX_FMT_BGR0:
|
||||
case AV_PIX_FMT_BGR24:
|
||||
case AV_PIX_FMT_RGB24:
|
||||
return 1;
|
||||
@ -346,6 +347,8 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt)
|
||||
case AV_PIX_FMT_YUV444P9:
|
||||
case AV_PIX_FMT_YUV444P10: return X264_CSP_I444;
|
||||
#ifdef X264_CSP_BGR
|
||||
case AV_PIX_FMT_BGR0:
|
||||
return X264_CSP_BGRA;
|
||||
case AV_PIX_FMT_BGR24:
|
||||
return X264_CSP_BGR;
|
||||
|
||||
@ -750,6 +753,7 @@ static const enum AVPixelFormat pix_fmts_10bit[] = {
|
||||
};
|
||||
static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {
|
||||
#ifdef X264_CSP_BGR
|
||||
AV_PIX_FMT_BGR0,
|
||||
AV_PIX_FMT_BGR24,
|
||||
AV_PIX_FMT_RGB24,
|
||||
#endif
|
||||
|
@ -4107,10 +4107,11 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
|
||||
int std_compliance)
|
||||
{
|
||||
if (ofmt) {
|
||||
unsigned int codec_tag;
|
||||
if (ofmt->query_codec)
|
||||
return ofmt->query_codec(codec_id, std_compliance);
|
||||
else if (ofmt->codec_tag)
|
||||
return !!av_codec_get_tag(ofmt->codec_tag, codec_id);
|
||||
return !!av_codec_get_tag2(ofmt->codec_tag, codec_id, &codec_tag);
|
||||
else if (codec_id == ofmt->video_codec ||
|
||||
codec_id == ofmt->audio_codec ||
|
||||
codec_id == ofmt->subtitle_codec)
|
||||
|
Loading…
Reference in New Issue
Block a user