[FFmpeg-trac] #8022(avutil:new): Enhance performance of FFMAX macro
FFmpeg
trac at avcodec.org
Tue Jul 16 12:26:38 EEST 2019
#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
More information about the FFmpeg-trac
mailing list