encoding-example-configs: add more comments regarding the scaling method

This commit is contained in:
Rudolf Polzer 2013-10-31 05:30:17 +01:00 committed by wm4
parent 78a57135f9
commit d64b165b2a
1 changed files with 16 additions and 2 deletions

View File

@ -231,11 +231,25 @@ vf-add = lavfi=graph="scale=floor(min(1024*min(1\,dar*54/97)\,in_w*max(1\,sar*23
# 2b: in_w*sar/SAR, in_h - fit to original height
# 2: the max of 2a and 2b (i.e. avoid enlarging both dimensions - let HW scaling handle this)
# output: the min of 1 and 2 (i.e. fulfill both constraints)
# setsar=1 to prevent scaling on the device (skip this if the device actually wants the proper sar to be specified for not performing needless scaling)
# setsar=1 to prevent scaling on the device (skip this if the device actually wants the proper SAR to be specified for not performing needless scaling)
#
# Simplified special case for SAR == 1, DAR == DW/DH:
# Variant: zoomed out
# vf-add = lavfi=graph="scale=floor(min(min(DW\,dar*DH)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(min(DW/dar\,DH)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=1"
# Variant: zoomed in
# vf-add = lavfi=graph="scale=floor(min(max(DW\,dar*DH)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(max(DW/dar\,DH)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=1"
# setsar=1 to prevent nasty almost-1 sar to be passed to the codec due to the rounding which can fail
# setsar=1 to prevent nasty almost-1 SAR to be passed to the codec due to the rounding which can fail
#
# If the device supports file SAR properly, we can make use of it to avoid
# upscaling. Note that setsar cannot be used to fake a different output SAR by
# applying a multiplier to the original one, so e..g it can't be used for the
# HP Slate 7!
# Variant: zoomed out
# vf-add = lavfi=graph="scale=floor(min(DW*min(1\,dar/DAR)\,in_w)/2+0.5)*2:floor(min(DH*min(DAR/dar\,1)\,in_h)/2+0.5)*2"
# Variant: zoomed in
# vf-add = lavfi=graph="scale=floor(min(DW*max(1\,dar/DAR)\,in_w)/2+0.5)*2:floor(min(DH*max(DAR/dar\,1)\,in_h)/2+0.5)*2"
# Simplified special case for SAR == 1, DAR == DW/DH:
# Variant: zoomed out
# vf-add = lavfi=graph="scale=floor(min(min(DW\,dar*DH)\,in_w)/2+0.5)*2:floor(min(min(DW/dar\,DH)\,in_h)/2+0.5)*2"
# Variant: zoomed in
# vf-add = lavfi=graph="scale=floor(min(max(DW\,dar*DH)\,in_w)/2+0.5)*2:floor(min(max(DW/dar\,DH)\,in_h)/2+0.5)*2"