aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/scale_eval.h
diff options
context:
space:
mode:
authorTristan Schmelcher <tschmelcher@google.com>2022-09-26 17:14:09 +0000
committerMichael Niedermayer <michael@niedermayer.cc>2022-09-27 00:07:43 +0200
commit179830108dbeb1c6b73105ae2234cf04874728b4 (patch)
tree6a2e97cb5667d9a322d1bfd1f61082244a786811 /libavfilter/scale_eval.h
parent543a46b4b2ff0f02fa85e45d7b7bcda19d3be9b4 (diff)
downloadffmpeg-179830108dbeb1c6b73105ae2234cf04874728b4.tar.gz
avfilter/scale_eval: Reduce rounding error.
When force_original_aspect_ratio and force_divisible_by are both used, dimensions are now rounded to the nearest allowed multiple of force_divisible_by rather than first rounding to the nearest integer and then rounding in a static direction. This results in less distortion of the aspect ratio. Reviewed-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Tristan Schmelcher <tschmelcher@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/scale_eval.h')
-rw-r--r--libavfilter/scale_eval.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/scale_eval.h b/libavfilter/scale_eval.h
index fceb023fec..2eb6970aad 100644
--- a/libavfilter/scale_eval.h
+++ b/libavfilter/scale_eval.h
@@ -38,7 +38,8 @@ int ff_scale_eval_dimensions(void *ctx,
* Transform evaluated width and height obtained from ff_scale_eval_dimensions
* into actual target width and height for scaling. Adjustment can occur if one
* or both of the evaluated values are of the form '-n' or if
- * force_original_aspect_ratio is set.
+ * force_original_aspect_ratio is set. force_divisible_by is used only when
+ * force_original_aspect_ratio is set and must be at least 1.
*
* Returns 0.
*/