diff options
author | jstebbins <[email protected]> | 2010-10-23 19:26:51 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-10-23 19:26:51 +0000 |
commit | 230295694e96bb9402974c641954529bf11c4375 (patch) | |
tree | 22a1112cd51214a59aacec22bfe7b74d7ce50997 | |
parent | 71339bee34b6dbc248ee2027ead281369f02024c (diff) |
update baseline presets with weightp=0
eliminate hack that defaults weightp=0 when bframes=0
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3623 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/standard_presets.xml | 12 | ||||
-rw-r--r-- | libhb/encx264.c | 38 | ||||
-rw-r--r-- | macosx/HBPresets.m | 12 | ||||
-rw-r--r-- | test/test.c | 24 |
4 files changed, 24 insertions, 62 deletions
diff --git a/gtk/src/standard_presets.xml b/gtk/src/standard_presets.xml index d44f9421e..ec4f16b2a 100644 --- a/gtk/src/standard_presets.xml +++ b/gtk/src/standard_presets.xml @@ -104,7 +104,7 @@ <key>VideoTwoPass</key> <integer>0</integer> <key>x264Option</key> - <string>cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6</string> + <string>cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6</string> </dict> <dict> <key>AudioList</key> @@ -189,7 +189,7 @@ <key>VideoTwoPass</key> <integer>0</integer> <key>x264Option</key> - <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0</string> + <string>level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0</string> </dict> <dict> <key>AudioList</key> @@ -274,7 +274,7 @@ <key>VideoTwoPass</key> <integer>0</integer> <key>x264Option</key> - <string>cabac=0:ref=2:me=umh:bframes=0:subme=6:8x8dct=0:trellis=0</string> + <string>cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0</string> </dict> <dict> <key>AudioList</key> @@ -862,7 +862,7 @@ <key>VideoTwoPass</key> <integer>0</integer> <key>x264Option</key> - <string>ref=1:b-pyramid=none:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0</string> + <string>ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0</string> </dict> <dict> <key>AudioList</key> @@ -947,7 +947,7 @@ <key>VideoTwoPass</key> <integer>0</integer> <key>x264Option</key> - <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:subme=6:8x8dct=0:trellis=0</string> + <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0</string> </dict> <dict> <key>AudioList</key> @@ -1032,7 +1032,7 @@ <key>VideoTwoPass</key> <integer>0</integer> <key>x264Option</key> - <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0</string> + <string>level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0</string> </dict> </array> <key>Default</key> diff --git a/libhb/encx264.c b/libhb/encx264.c index 83d3edabb..bdc32e6e4 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -85,44 +85,6 @@ int encx264Init( hb_work_object_t * w, hb_job_t * job ) x264_param_default( ¶m ); - /* Default weightp to off for baseline, - overridable through x264 option strings. */ - if( job->x264opts != NULL && *job->x264opts != '\0' ) - { - char *x264opts, *x264opts_start; - - x264opts = x264opts_start = strdup(job->x264opts); - - while( x264opts_start && *x264opts ) - { - char *name = x264opts; - char *value; - - x264opts += strcspn( x264opts, ":" ); - if( *x264opts ) - { - *x264opts = 0; - x264opts++; - } - - value = strchr( name, '=' ); - if( value ) - { - *value = 0; - value++; - } - - if( !( strcmp( name, "bframes" ) ) ) - { - if( atoi( value ) == 0 ) - { - param.analyse.i_weighted_pred = X264_WEIGHTP_NONE; - hb_log("encx264: no bframes, disabling weight-p unless told otherwise"); - } - } - } - } - /* Enable metrics */ param.analyse.b_psnr = 1; param.analyse.b_ssim = 1; diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m index c810e729a..9cf4af211 100644 --- a/macosx/HBPresets.m +++ b/macosx/HBPresets.m @@ -294,7 +294,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"ref=1:b-pyramid=none:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [preset setObject:@"ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; @@ -405,7 +405,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6" forKey:@"x264Option"]; + [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; @@ -814,7 +814,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* x264 Option String */ - [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; @@ -907,7 +907,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; /* x264 Option String */ - [preset setObject:@"level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [preset setObject:@"level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; @@ -1000,7 +1000,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; /* x264 Option String */ - [preset setObject:@"level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [preset setObject:@"level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; @@ -1093,7 +1093,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; /* x264 Option String */ - [preset setObject:@"level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [preset setObject:@"level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; diff --git a/test/test.c b/test/test.c index a2a8b55af..63282a549 100644 --- a/test/test.c +++ b/test/test.c @@ -645,7 +645,7 @@ static int HandleEvents( hb_handle_t * h ) maxWidth = 720; if( !x264opts ) { - x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6"); + x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6"); } if( !anamorphic_mode ) { @@ -691,7 +691,7 @@ static int HandleEvents( hb_handle_t * h ) maxWidth = 320; if( !x264opts ) { - x264opts = strdup("level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0"); + x264opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0"); } job->chapter_markers = 1; @@ -732,7 +732,7 @@ static int HandleEvents( hb_handle_t * h ) maxWidth = 480; if( !x264opts ) { - x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:subme=6:8x8dct=0:trellis=0"); + x264opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0"); } job->chapter_markers = 1; @@ -987,7 +987,7 @@ static int HandleEvents( hb_handle_t * h ) } if( !x264opts ) { - x264opts = strdup("ref=1:b-pyramid=none:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0"); + x264opts = strdup("ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0"); } if( !anamorphic_mode ) { @@ -1033,7 +1033,7 @@ static int HandleEvents( hb_handle_t * h ) maxWidth = 480; if( !x264opts ) { - x264opts = strdup("level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:subme=6:8x8dct=0:trellis=0"); + x264opts = strdup("level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0"); } job->chapter_markers = 1; @@ -1075,7 +1075,7 @@ static int HandleEvents( hb_handle_t * h ) maxWidth = 640; if( !x264opts ) { - x264opts = strdup("level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0"); + x264opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0"); } job->chapter_markers = 1; @@ -2568,11 +2568,11 @@ static void ShowPresets() { printf("\n< Apple\n"); - printf("\n + Universal: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6\n"); + printf("\n + Universal: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6\n"); - printf("\n + iPod: -e x264 -b 700 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0\n"); + printf("\n + iPod: -e x264 -b 700 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0\n"); - printf("\n + iPhone & iPod Touch: -e x264 -q 20.0 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 480 -m -x cabac=0:ref=2:me=umh:bframes=0:subme=6:8x8dct=0:trellis=0\n"); + printf("\n + iPhone & iPod Touch: -e x264 -q 20.0 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 480 -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n"); printf("\n + iPad: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 1024 --loose-anamorphic -m\n"); @@ -2592,11 +2592,11 @@ static void ShowPresets() printf("\n + Classic: -b 1000 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4\n"); - printf("\n + AppleTV Legacy: -e x264 -b 2500 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --strict-anamorphic -m -x ref=1:b-pyramid=none:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0\n"); + printf("\n + AppleTV Legacy: -e x264 -b 2500 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --strict-anamorphic -m -x ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0\n"); - printf("\n + iPhone Legacy: -e x264 -b 960 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 480 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:subme=6:8x8dct=0:trellis=0\n"); + printf("\n + iPhone Legacy: -e x264 -b 960 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 480 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n"); - printf("\n + iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 640 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0\n"); + printf("\n + iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 640 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0\n"); printf("\n>\n"); |