[FFmpeg-trac] #7242(avfilter:new): zoompan filter variables 'in' and 'on' start at 2, 1 instead of at 0
FFmpeg
trac at avcodec.org
Sun Jun 3 11:19:31 EEST 2018
#7242: zoompan filter variables 'in' and 'on' start at 2, 1 instead of at 0
------------------------------------+------------------------------------
Reporter: jdlh | Owner:
Type: defect | Status: new
Priority: normal | Component: avfilter
Version: git-master | Resolution:
Keywords: zoompan | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by jdlh):
Replying to [comment:2 Gyan]:
> ... the assignment logic of **in** and **on** is correct. They are meant
to be cardinal values, measuring the amount fed in and fed. The **n** in
crop, drawtext amd some other filters are ordinal values and represent the
index which starts from 0.
Oh, ffmpeg project....
Where is this cardinal vs ordinal intention recorded? The documentation is
vague. There's no comment in the code saying that these are to be
cardinal. I don't see a compelling reason for this filter to be
inconsistent, in using cardinal numbers where other filters use ordinal
numbers.
That said, the ordinal vs cardinal distinction could be viewed as an
interface commitment with users of the filter. Changing starting numbers
from 1 to 0 could disrupt some users of the filter. I don't suppose we
have much of a way of knowing how bad the disruption would be.
And, cardinal = ordinal + 1, so anyone who wants an ordinal value can
easily calculate it from a cardinal value.
Certainly, it would be very desirable to state the ordinal or cardinal
choice clearly in both the code and the docs.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7242#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list