mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-20 07:48:15 +02:00
avcodec/utils: avcodec_string: print colorspace type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ea07dbdeaa
commit
8da23be458
@ -2601,6 +2601,21 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
|
|||||||
if (enc->color_range != AVCOL_RANGE_UNSPECIFIED)
|
if (enc->color_range != AVCOL_RANGE_UNSPECIFIED)
|
||||||
av_strlcatf(detail, sizeof(detail),
|
av_strlcatf(detail, sizeof(detail),
|
||||||
enc->color_range == AVCOL_RANGE_MPEG ? "tv, ": "pc, ");
|
enc->color_range == AVCOL_RANGE_MPEG ? "tv, ": "pc, ");
|
||||||
|
if (enc->colorspace<9U) {
|
||||||
|
static const char *name[] = {
|
||||||
|
"GBR",
|
||||||
|
"bt709",
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
"fcc",
|
||||||
|
"bt470bg",
|
||||||
|
"smpte170m",
|
||||||
|
"smpte240m",
|
||||||
|
"YCgCo",
|
||||||
|
};
|
||||||
|
if (name[enc->colorspace])
|
||||||
|
av_strlcatf(detail, sizeof(detail), "%s, ", name[enc->colorspace]);
|
||||||
|
}
|
||||||
if (strlen(detail) > 1) {
|
if (strlen(detail) > 1) {
|
||||||
detail[strlen(detail) - 2] = 0;
|
detail[strlen(detail) - 2] = 0;
|
||||||
av_strlcatf(buf, buf_size, "%s)", detail);
|
av_strlcatf(buf, buf_size, "%s)", detail);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user