[FFmpeg-trac] #9757(avfilter:new): cropdetect ignores a value of 1 as the round parameter

FFmpeg trac at avcodec.org
Fri Apr 29 17:49:26 EEST 2022


#9757: cropdetect ignores a value of 1 as the round parameter
-------------------------------------+-------------------------------------
             Reporter:  Llyw         |                    Owner:  (none)
                 Type:  enhancement  |                   Status:  new
             Priority:  normal       |                Component:  avfilter
              Version:  unspecified  |               Resolution:
             Keywords:  cropdetect   |               Blocked By:
  round                              |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by Llyw:

Old description:

> In its current implementation, the `cropdetect` filter does not accept a
> value of 1 for the `round` parameter and falls back to the default value,
> which currently is 16.
>
> While not explicitly documented in the online help, I assume that this is
> due to 2 being the minimum value for the `round` parameter. This
> unfortunately forces us to remove information even when this is not even
> necessary: If I am rescaling the cropped image to output dimensions that
> satisfy all divisibility requirements enforced by the codec and sample
> format before encoding, the output of `cropdetect` does not even have to
> satisfy any divisibility requirements. (I do understand, that one would
> have to specify `exact=1` when using the `crop` filter in such a
> scenario.)
>
> So I would appreciate it, if the lowest accepted value for `round` is
> changed to 1. (In the hopes that the code then does not modify the
> detected crop any further since all integer numbers are already divisible
> by 1.) Note that one should also properly document the minimum value for
> the `round` param.

New description:

 In its current implementation, the `cropdetect` filter does not accept a
 value of 1 for the `round` parameter and falls back to the default value,
 which currently is 16.

 While not explicitly documented in the online help, I assume that this is
 due to 2 being the minimum value for the `round` parameter. This
 unfortunately forces us to remove information even when this is not even
 necessary: If I am rescaling the cropped image to output dimensions that
 satisfy all divisibility requirements enforced by the codec and sample
 format before encoding, the output of `cropdetect` does not even have to
 satisfy any divisibility requirements. (I do understand that one would
 have to specify `exact=1` when using the `crop` filter in such a
 scenario.)

 So I would appreciate it, if the lowest accepted value for `round` is
 changed to 1. (In the hopes that the code then does not modify the
 detected crop any further since all integer numbers are already divisible
 by 1.) Note that one should also properly document the minimum value for
 the `round` param.

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9757#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list