From 9e8eba11fac3dd4043afe64943c00f6dcf15517f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 31 Oct 2013 05:30:17 +0100 Subject: encoding-example-configs: add more comments regarding the scaling method --- etc/encoding-example-profiles.conf | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/etc/encoding-example-profiles.conf b/etc/encoding-example-profiles.conf index 9e2dd280b3..25186bb2b9 100644 --- a/etc/encoding-example-profiles.conf +++ b/etc/encoding-example-profiles.conf @@ -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" -- cgit v1.2.3