diff options
author | Clément Bœsch <u@pkh.me> | 2018-05-06 13:31:32 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2018-05-08 10:28:06 +0200 |
commit | de956198a9eca52e7882ca4ad6b9b42ae3163525 (patch) | |
tree | 9adf0d15f425cb05dd3286048d588d7cef1aa590 /libavfilter | |
parent | 34e1e53e28856af9b06460d0c061e7623d73dd5a (diff) | |
download | ffmpeg-de956198a9eca52e7882ca4ad6b9b42ae3163525.tar.gz |
lavfi/nlmeans: reorder memory accesses in get_integral_patch_value
This doesn't seem to make much of a difference but it can't hurt.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_nlmeans.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c index 72a75a6e7a..22d26a12e3 100644 --- a/libavfilter/vf_nlmeans.c +++ b/libavfilter/vf_nlmeans.c @@ -131,10 +131,10 @@ static int query_formats(AVFilterContext *ctx) */ static inline int get_integral_patch_value(const uint32_t *ii, int ii_lz_32, int x, int y, int p) { - const int e = ii[(y + p ) * ii_lz_32 + (x + p )]; - const int d = ii[(y + p ) * ii_lz_32 + (x - p - 1)]; - const int b = ii[(y - p - 1) * ii_lz_32 + (x + p )]; const int a = ii[(y - p - 1) * ii_lz_32 + (x - p - 1)]; + const int b = ii[(y - p - 1) * ii_lz_32 + (x + p )]; + const int d = ii[(y + p ) * ii_lz_32 + (x - p - 1)]; + const int e = ii[(y + p ) * ii_lz_32 + (x + p )]; return e - d - b + a; } |