+
+ # For a given profile, to override the 2 pass behavior to be single pass,
+ # simply set the PASSES variable below to "2" instead of "1 2" inside your profile handler.
+ # It indicates which PASS numbers to loop over. PASSES="2" means just do pass 2 => single pass mode.
+ PASSES="1 2"
+
+ # Declare our default 2 pass variables
+ passlogfile_opt="-passlogfile $passlogfile"
+ pass_opt="pass=%PASS"
+
+ # Check the global force_onepass_mode. If it is set, change our variables appropriately
+ # to force 1-pass encoding across all profiles.
+ if [ $force_onepass_mode -eq 1 ]; then
+ PASSES="2"
+ passlogfile_opt=""
+ pass_opt=""
+ fi
+