#8022: Enhance performance of FFMAX macro
----------------------------------+--------------------------------------
Reporter: UlfZibis | Type: defect
Status: new | Priority: normal
Component: avutil | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
Summary of the bug:
FFMAX is often used in this scenario:
{{{
original = FFMAX(original , limit);
}}}
If the original equals limit, with the current implementation limit is
copied to original, which is superfluous.
So I suggest to implement FFMAX equivalent to FFMIN.
Current:
{{{
#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
}}}
Proposed:
{{{
#define FFMAX(a,b) ((a) < (b) ? (b) : (a))
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8022>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".