For anamorphic videos, enabling this option leads to adjustment of
output dimensions to obtain square pixels when the user requests
proportional scaling through either of the w/h expressions or
force_original_aspect_ratio.
Output SAR is always reset to 1.
Option added to scale, scale_cuda, scale_npp & scale_vaapi.
libplacebo already has a similar option with different semantics,
scale_vt and scale_vulkan don't implement force_oar, so for these
three filters, I've made minimal changes needed to not break building
or change output.
{"force_divisible_by","enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used",OFFSET(force_divisible_by),AV_OPT_TYPE_INT,{.i64=1},1,256,FLAGS},
{"reset_sar","reset SAR to 1 and scale to square pixels if scaling proportionally",OFFSET(reset_sar),AV_OPT_TYPE_BOOL,{.i64=0},0,1,FLAGS},
{"force_divisible_by","enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used",OFFSET(force_divisible_by),AV_OPT_TYPE_INT,{.i64=1},1,256,FLAGS},
{"reset_sar","reset SAR to 1 and scale to square pixels if scaling proportionally",OFFSET(reset_sar),AV_OPT_TYPE_BOOL,{.i64=0},0,1,FLAGS},
{"force_divisible_by","enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used",OFFSET(force_divisible_by),AV_OPT_TYPE_INT,{.i64=1},1,256,FLAGS},
{"reset_sar","reset SAR to 1 and scale to square pixels if scaling proportionally",OFFSET(reset_sar),AV_OPT_TYPE_BOOL,{.i64=0},0,1,FLAGS},
{"eval","specify when to evaluate expressions",OFFSET(eval_mode),AV_OPT_TYPE_INT,{.i64=EVAL_MODE_INIT},0,EVAL_MODE_NB-1,FLAGS,.unit="eval"},
{"init","eval expressions once during initialization",0,AV_OPT_TYPE_CONST,{.i64=EVAL_MODE_INIT},0,0,FLAGS,.unit="eval"},
{"frame","eval expressions during initialization and per-frame",0,AV_OPT_TYPE_CONST,{.i64=EVAL_MODE_FRAME},0,0,FLAGS,.unit="eval"},
{"force_divisible_by","enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used",OFFSET(force_divisible_by),AV_OPT_TYPE_INT,{.i64=1},1,256,FLAGS},
{"reset_sar","reset SAR to 1 and scale to square pixels if scaling proportionally",OFFSET(reset_sar),AV_OPT_TYPE_BOOL,{.i64=0},0,1,FLAGS},