[x264-devel] [PATCH] common: use lowercase names for colormatrix options

Vittorio Giovara vittorio.giovara at gmail.com
Mon Sep 29 14:15:04 CEST 2014


---
 common/common.c | 2 +-
 x264.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/common.c b/common/common.c
index a9e1c73..f775c2c 100644
--- a/common/common.c
+++ b/common/common.c
@@ -517,7 +517,7 @@ int x264_param_apply_profile( x264_param_t *param, const char *profile )
 static int parse_enum( const char *arg, const char * const *names, int *dst )
 {
     for( int i = 0; names[i]; i++ )
-        if( !strcmp( arg, names[i] ) )
+        if( !strcasecmp( arg, names[i] ) )
         {
             *dst = i;
             return 0;
diff --git a/x264.h b/x264.h
index b896f91..a0ab97c 100644
--- a/x264.h
+++ b/x264.h
@@ -204,7 +204,7 @@ static const char * const x264_fullrange_names[] = { "off", "on", 0 };
 static const char * const x264_colorprim_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m", "smpte240m", "film", "bt2020", 0 };
 static const char * const x264_transfer_names[] = { "", "bt709", "undef", "", "bt470m", "bt470bg", "smpte170m", "smpte240m", "linear", "log100", "log316",
                                                     "iec61966-2-4", "bt1361e", "iec61966-2-1", "bt2020-10", "bt2020-12", 0 };
-static const char * const x264_colmatrix_names[] = { "GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m", "smpte240m", "YCgCo", "bt2020nc", "bt2020c", 0 };
+static const char * const x264_colmatrix_names[] = { "gbr", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m", "smpte240m", "ycgco", "bt2020nc", "bt2020c", 0 };
 static const char * const x264_nal_hrd_names[] = { "none", "vbr", "cbr", 0 };
 
 /* Colorspace type */
-- 
1.9.3 (Apple Git-50)



More information about the x264-devel mailing list