mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
avfilter/vf_scale_*: add enum names for force_oar magic values
This commit is contained in:
@@ -148,14 +148,14 @@ int ff_scale_adjust_dimensions(AVFilterLink *inlink,
|
||||
/* Note that force_original_aspect_ratio may overwrite the previous set
|
||||
* dimensions so that it is not divisible by the set factors anymore
|
||||
* unless force_divisible_by is defined as well */
|
||||
if (force_original_aspect_ratio) {
|
||||
if (force_original_aspect_ratio != SCALE_FORCE_OAR_DISABLE) {
|
||||
// Including force_divisible_by here rounds to the nearest multiple of it.
|
||||
int64_t tmp_w = av_rescale(h, inlink->w * w_adj, inlink->h * (int64_t)force_divisible_by)
|
||||
* force_divisible_by;
|
||||
int64_t tmp_h = av_rescale(w, inlink->h, inlink->w * w_adj * (int64_t)force_divisible_by)
|
||||
* force_divisible_by;
|
||||
|
||||
if (force_original_aspect_ratio == 1) {
|
||||
if (force_original_aspect_ratio == SCALE_FORCE_OAR_DECREASE) {
|
||||
w = FFMIN(tmp_w, w);
|
||||
h = FFMIN(tmp_h, h);
|
||||
if (force_divisible_by > 1) {
|
||||
@@ -163,7 +163,7 @@ int ff_scale_adjust_dimensions(AVFilterLink *inlink,
|
||||
w = w / force_divisible_by * force_divisible_by;
|
||||
h = h / force_divisible_by * force_divisible_by;
|
||||
}
|
||||
} else {
|
||||
} else { // SCALE_FORCE_OAR_INCREASE
|
||||
w = FFMAX(tmp_w, w);
|
||||
h = FFMAX(tmp_h, h);
|
||||
if (force_divisible_by > 1) {
|
||||
|
||||
Reference in New Issue
Block a user