[FFmpeg-devel] [PATCH] lavfi/avfiltergraph: fix channel substitution score.

Michael Niedermayer michaelni at gmx.at
Sun Dec 7 14:07:07 CET 2014


On Sun, Dec 07, 2014 at 01:31:59PM +0100, Nicolas George wrote:
> Only count the number of channels that are present on input.
> Fix a case where input FL+FR+BL gives a better score to 6.1
> than quad because BL+BR→SL+SR counts as two remapped channels
> while BL→BL+BR counts as one preserved and one extra.
> 
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
>  libavfilter/avfiltergraph.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 
> There are more issues in this score logic.
> For example stereo+BR→stereo+SL is accepted because of the BL+BR→SL+SR
> substitution, this is wrong.
> 
> The obvious fix would be to change "(out_chlayout & cmp1)" into
> "(out_chlayout & cmp1) == cmp1", i.e. only accept a substitution if the
> target is entirely available in the output, but that would break the case
> stereo+BR→stereo+SL.
> 
> I do not have time for a more complete fix right now, but I believe the
> present patch is valid and useful by itself.

LGTM though this is your code, you know it much better than i do

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141207/a6e4dbc2/attachment.asc>


More information about the ffmpeg-devel mailing list