--- /usr/ports/multimedia/x264/work/x264-snapshot-20060926-2245/x264.c.orig Sun Oct 15 10:10:14 2006 +++ /usr/ports/multimedia/x264/work/x264-snapshot-20060926-2245/x264.c Sun Oct 15 10:29:51 2006 @@ -278,6 +278,7 @@ H0( " -o, --output Specify output file\n" ); H0( " --sar width:height Specify Sample Aspect Ratio\n" ); H0( " --fps Specify framerate\n" ); + H0( " --y4m-input Treat input as y4m\n" ); H0( " --seek First frame to encode\n" ); H0( " --frames Maximum number of frames to encode\n" ); H0( " --level Specify level (as defined by Annex A)\n" ); @@ -338,6 +339,7 @@ #define OPT_PROGRESS 261 #define OPT_VISUALIZE 262 #define OPT_LONGHELP 263 +#define OPT_Y4M_INPUT 264 static struct option long_options[] = { @@ -364,6 +366,7 @@ { "no-asm", no_argument, NULL, 0 }, { "sar", required_argument, NULL, 0 }, { "fps", required_argument, NULL, 0 }, + { "y4m-input", no_argument, NULL, OPT_Y4M_INPUT }, { "frames", required_argument, NULL, OPT_FRAMES }, { "seek", required_argument, NULL, OPT_SEEK }, { "output", required_argument, NULL, 'o' }, @@ -459,6 +462,9 @@ case OPT_SEEK: opt->i_seek = atoi( optarg ); break; + case OPT_Y4M_INPUT: + b_y4m = 1; + break; case 'o': if( !strncasecmp(optarg + strlen(optarg) - 4, ".mp4", 4) ) { @@ -562,10 +568,13 @@ psz = psz_filename + strlen(psz_filename) - 1; while( psz > psz_filename && *psz != '.' ) psz--; - if( !strncasecmp( psz, ".avi", 4 ) || !strncasecmp( psz, ".avs", 4 ) ) - b_avis = 1; - if( !strncasecmp( psz, ".y4m", 4 ) ) - b_y4m = 1; + if( !b_y4m ) + { + if( !strncasecmp( psz, ".avi", 4 ) || !strncasecmp( psz, ".avs", 4 ) ) + b_avis = 1; + if( !strncasecmp( psz, ".y4m", 4 ) ) + b_y4m = 1; + } if( !(b_avis || b_y4m) ) // raw yuv {