From: Anton Mitrofanov Date: Mon, 3 May 2021 10:54:26 +0000 (+0300) Subject: y4m: Support ffmpeg's color range extension X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5180c07ccfbd336b2bcea15943e8aca695c1ede8;p=libx264 y4m: Support ffmpeg's color range extension --- diff --git a/input/y4m.c b/input/y4m.c index bae18ff2..fea27f45 100644 --- a/input/y4m.c +++ b/input/y4m.c @@ -172,6 +172,15 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c tokstart += 6; alt_colorspace = parse_csp_and_depth( tokstart, &alt_bit_depth ); } + else if( !strncmp( "COLORRANGE=", tokstart, 11 ) ) + { + /* ffmpeg's color range extension */ + tokstart += 11; + if( !strncmp( "FULL", tokstart, 4 ) ) + info->fullrange = 1; + else if( !strncmp( "LIMITED", tokstart, 7 ) ) + info->fullrange = 0; + } tokstart = strchr( tokstart, 0x20 ); break; }