diff options
author | Henrik Gramner <gramner@twoorioles.com> | 2019-11-22 19:34:59 +0300 |
---|---|---|
committer | Henrik Gramner <gramner@twoorioles.com> | 2019-11-27 00:41:19 +0300 |
commit | fc6c2578b63a97d827c04b452c0e772cdd62e882 (patch) | |
tree | c6d7817d83561f47898fa4c78c60ed59b2354e47 /src/ipred_tmpl.c | |
parent | 246c280363580e849905615f75290f09fc2a3bc9 (diff) |
Specify inlining decisions for common ipred_z C functions
Diffstat (limited to 'src/ipred_tmpl.c')
-rw-r--r-- | src/ipred_tmpl.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/ipred_tmpl.c b/src/ipred_tmpl.c index b21f199..ef076f6 100644 --- a/src/ipred_tmpl.c +++ b/src/ipred_tmpl.c @@ -324,7 +324,9 @@ static void ipred_smooth_h_c(pixel *dst, const ptrdiff_t stride, } } -static int get_filter_strength(const int wh, const int angle, const int is_sm) { +static NOINLINE int get_filter_strength(const int wh, const int angle, + const int is_sm) +{ if (is_sm) { if (wh <= 8) { if (angle >= 64) return 2; @@ -357,10 +359,10 @@ static int get_filter_strength(const int wh, const int angle, const int is_sm) { return 0; } -static void filter_edge(pixel *const out, const int sz, - const int lim_from, const int lim_to, - const pixel *const in, - const int from, const int to, const unsigned strength) +static NOINLINE void filter_edge(pixel *const out, const int sz, + const int lim_from, const int lim_to, + const pixel *const in, const int from, + const int to, const int strength) { static const uint8_t kernel[3][5] = { { 0, 4, 8, 4, 0 }, @@ -382,14 +384,13 @@ static void filter_edge(pixel *const out, const int sz, out[i] = in[iclip(i, from, to - 1)]; } -static int get_upsample(const int blk_wh, const unsigned d, const int type) { - if (d >= 40) return 0; - return type ? (blk_wh <= 8) : (blk_wh <= 16); +static inline int get_upsample(const int wh, const int angle, const int is_sm) { + return angle < 40 && wh <= 16 >> is_sm; } -static void upsample_edge(pixel *const out, const int hsz, - const pixel *const in, const int from, const int to - HIGHBD_DECL_SUFFIX) +static NOINLINE void upsample_edge(pixel *const out, const int hsz, + const pixel *const in, const int from, + const int to HIGHBD_DECL_SUFFIX) { static const int8_t kernel[4] = { -1, 9, 9, -1 }; int i; |