From: Rodeo Date: Wed, 5 Jun 2013 15:11:42 +0000 (+0000) Subject: QSV: merge from trunk. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fde53aa853deacb51877d434dee8b35d3f9ac00;p=handbrake QSV: merge from trunk. git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/qsv@5554 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/common.c b/libhb/common.c index 45c49395c..8770d73e0 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -1440,7 +1440,7 @@ int hb_mixdown_get_best(uint32_t codec, uint64_t layout, int mixdown) if (codec & HB_ACODEC_PASS_FLAG) return HB_AMIXDOWN_NONE; - int best_mixdown = -1; + int best_mixdown = HB_INVALID_AMIXDOWN; const hb_mixdown_t *audio_mixdown = hb_mixdown_get_next(NULL); // test all non-None mixdowns while the value is <= the requested mixdown // HB_INVALID_AMIXDOWN means the highest supported mixdown was requested @@ -1497,7 +1497,7 @@ int hb_mixdown_get_from_name(const char *name) } fail: - return -1; + return HB_INVALID_AMIXDOWN; } const char* hb_mixdown_get_name(int mixdown) @@ -1826,7 +1826,7 @@ void hb_autopassthru_apply_settings(hb_job_t *job) audio->config.out.bitrate = hb_audio_bitrate_get_default(audio->config.out.codec, audio->config.out.samplerate, - audio->config.out.mixdown ); + audio->config.out.mixdown); audio->config.out.compression_level = hb_audio_compression_get_default(audio->config.out.codec); } diff --git a/scripts/manicure.rb b/scripts/manicure.rb index c6d2cdc3f..b8be37432 100755 --- a/scripts/manicure.rb +++ b/scripts/manicure.rb @@ -377,6 +377,10 @@ class Display #Mixdowns case audioTrack["AudioMixdown"] + when "Mono (Left Only)" + audioMixdowns << "left_only" + when "Mono (Right Only)" + audioMixdowns << "right_only" when /Mono/ audioMixdowns << "mono" when /Stereo/ @@ -385,10 +389,16 @@ class Display audioMixdowns << "dpl1" when /Dolby Pro Logic II/ audioMixdowns << "dpl2" - when /discrete/ - audioMixdowns << "6ch" + when /5.1/, /discrete/ + audioMixdowns << "5point1" + when /6.1/ + audioMixdowns << "6point1" + when "7.1 (5F/2R/LFE)" + audioMixdowns << "5_2_lfe" + when /7.1/ + audioMixdowns << "7point1" when /None/ - audioMixdowns << "auto" + audioMixdowns << "none" end #Samplerates @@ -765,6 +775,10 @@ class Display #Mixdowns case audioTrack["AudioMixdown"] + when "Mono (Left Only)" + audioMixdowns << "left_only" + when "Mono (Right Only)" + audioMixdowns << "right_only" when /Mono/ audioMixdowns << "mono" when /Stereo/ @@ -773,10 +787,16 @@ class Display audioMixdowns << "dpl1" when /Dolby Pro Logic II/ audioMixdowns << "dpl2" - when /discrete/ - audioMixdowns << "6ch" + when /5.1/, /discrete/ + audioMixdowns << "5point1" + when /6.1/ + audioMixdowns << "6point1" + when "7.1 (5F/2R/LFE)" + audioMixdowns << "5_2_lfe" + when /7.1/ + audioMixdowns << "7point1" when /None/ - audioMixdowns << "auto" + audioMixdowns << "none" end #Samplerates @@ -1159,6 +1179,10 @@ class Display #Mixdowns case audioTrack["AudioMixdown"] + when "Mono (Left Only)" + audioMixdowns << "left_only" + when "Mono (Right Only)" + audioMixdowns << "right_only" when /Mono/ audioMixdowns << "mono" when /Stereo/ @@ -1167,10 +1191,16 @@ class Display audioMixdowns << "dpl1" when /Dolby Pro Logic II/ audioMixdowns << "dpl2" - when /discrete/ - audioMixdowns << "6ch" + when /5.1/, /discrete/ + audioMixdowns << "5point1" + when /6.1/ + audioMixdowns << "6point1" + when "7.1 (5F/2R/LFE)" + audioMixdowns << "5_2_lfe" + when /7.1/ + audioMixdowns << "7point1" when /None/ - audioMixdowns << "auto" + audioMixdowns << "none" end #Samplerates @@ -1605,6 +1635,10 @@ class Display #Mixdowns case audioTrack["AudioMixdown"] + when "Mono (Left Only)" + audioMixdowns << "left_only" + when "Mono (Right Only)" + audioMixdowns << "right_only" when /Mono/ audioMixdowns << "mono" when /Stereo/ @@ -1613,10 +1647,16 @@ class Display audioMixdowns << "dpl1" when /Dolby Pro Logic II/ audioMixdowns << "dpl2" - when /discrete/ - audioMixdowns << "6ch" + when /5.1/, /discrete/ + audioMixdowns << "5point1" + when /6.1/ + audioMixdowns << "6point1" + when "7.1 (5F/2R/LFE)" + audioMixdowns << "5_2_lfe" + when /7.1/ + audioMixdowns << "7point1" when /None/ - audioMixdowns << "auto" + audioMixdowns << "none" end #Samplerates diff --git a/test/test.c b/test/test.c index 967982c9a..7cfabaf87 100644 --- a/test/test.c +++ b/test/test.c @@ -766,7 +766,7 @@ static int HandleEvents( hb_handle_t * h ) } if( !mixdowns ) { - mixdowns = strdup("dpl2,auto"); + mixdowns = strdup("dpl2,none"); } if( !arates ) { @@ -1042,7 +1042,7 @@ static int HandleEvents( hb_handle_t * h ) } if( !mixdowns ) { - mixdowns = strdup("dpl2,auto"); + mixdowns = strdup("dpl2,none"); } if( !arates ) { @@ -1116,7 +1116,7 @@ static int HandleEvents( hb_handle_t * h ) } if( !mixdowns ) { - mixdowns = strdup("dpl2,auto"); + mixdowns = strdup("dpl2,none"); } if( !arates ) { @@ -1186,7 +1186,7 @@ static int HandleEvents( hb_handle_t * h ) } if( !mixdowns ) { - mixdowns = strdup("dpl2,auto"); + mixdowns = strdup("dpl2,none"); } if( !arates ) { @@ -1457,7 +1457,7 @@ static int HandleEvents( hb_handle_t * h ) } if( !mixdowns ) { - mixdowns = strdup("dpl2,auto"); + mixdowns = strdup("dpl2,none"); } if( !arates ) { @@ -3457,19 +3457,19 @@ static void ShowPresets() fprintf( stderr, "%s - %s - %s\n", HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE ); printf("\n< Devices\n"); - printf("\n + Universal: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 720 -Y 576 --loose-anamorphic --modulus 2 -m --x264-preset fast --h264-profile baseline --h264-level 3.0\n"); + printf("\n + Universal: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,none -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 720 -Y 576 --loose-anamorphic --modulus 2 -m --x264-preset fast --h264-profile baseline --h264-level 3.0\n"); printf("\n + iPod: -e x264 -q 22.0 -r 30 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -I -X 320 -Y 240 --modulus 2 -m --x264-preset medium --h264-profile baseline --h264-level 1.3\n"); printf("\n + iPhone & iPod touch: -e x264 -q 22.0 -r 30 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n"); printf("\n + iPad: -e x264 -q 20.0 -r 30 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n"); - printf("\n + AppleTV: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 960 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1 -x qpmin=4:cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n"); - printf("\n + AppleTV 2: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n"); - printf("\n + AppleTV 3: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1920 -Y 1080 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.0\n"); + printf("\n + AppleTV: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,none -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 960 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1 -x qpmin=4:cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n"); + printf("\n + AppleTV 2: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,none -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n"); + printf("\n + AppleTV 3: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,none -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1920 -Y 1080 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.0\n"); printf("\n + Android: -e x264 -q 22.0 -r 30 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 720 -Y 576 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 3.0\n"); printf("\n + Android Tablet: -e x264 -q 22.0 -r 30 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 1280 -Y 720 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 3.1\n"); printf("\n>\n"); printf("\n< Regular\n"); printf("\n + Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 --loose-anamorphic --modulus 2 -m --x264-preset veryfast --h264-profile main --h264-level 4.0\n"); - printf("\n + High Profile: -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 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 --decomb --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.1\n"); + printf("\n + High Profile: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,none -R Auto,Auto -D 0.0,0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 --decomb --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.1\n"); printf("\n>\n"); }