[FFmpeg-trac] #9757(avfilter:new): cropdetect ignores a value of 1 as the round parameter
FFmpeg
trac at avcodec.org
Sat Apr 30 10:06:18 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 |
-------------------------------------+-------------------------------------
Comment (by Llyw):
I just took a look at the source code and realized that there are even
more restrictions in place that are not documented: In addition to the
`round` parameter needing to be greater than 1, it will also automatically
get multiplied by 2 if the input value is odd and the offsets for the crop
rectangle are also modified such that they are divisible by 2.
While a comment in the code suggests that this has something to do with
the YUV color model, the code more likely was added to ensure that one
will obtain an output that works with chroma subsampled video.
However, again, such requirements would not have to be met in my use case
(or when you are working with non-subsampled formats) and you can already
tell the `crop` filter that you want it to be exact. But instead of a
simple relaxation of the minimum value for `round`, it seems that I would
need you to introduce a setting that would drop the aforementioned
restrictions of the `round` parameter and modification of `cropdetect`'s
output altogether, just like `exact=1` does for `crop`. Such a setting
could be off by default to keep things backwards portable.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9757#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list