Log in

View Full Version : What do the functions iClip3 and iClip1 do in the JM reference software?


SamK
18th October 2017, 00:37
I am trying to understand the H.264/AVC JM reference software for research purpose.
Many of the functions in it contain the functions iClip1 and iClip3. However, I am not able to find their definitions anywhere in the reference software. As far as I know they are not even standard C library functions.
How can I find the actual role of these functions and where?

raffriff42
18th October 2017, 02:26
Did you look in the headers? :sly:..JM\lcommon\inc\ifunctions.h

static inline int iClip1(int high, int x)
{
x = imax(x, 0);
x = imin(x, high);

return x;
}

static inline int iClip3(int low, int high, int x)
{
x = imax(x, low);
x = imin(x, high);

return x;
}