]> granicus.if.org Git - libx264/commitdiff
y4m: Support ffmpeg's color range extension
authorAnton Mitrofanov <BugMaster@narod.ru>
Mon, 3 May 2021 10:54:26 +0000 (13:54 +0300)
committerAnton Mitrofanov <BugMaster@narod.ru>
Mon, 3 May 2021 10:54:26 +0000 (13:54 +0300)
input/y4m.c

index bae18ff2dadfb8f60accf97a3ca748c0c25279d1..fea27f457a0c45c7e9d90e96c6a5e2e6424dce19 100644 (file)
@@ -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;
         }