avcodec/me_cmp: Mark ff_square_tab as hidden

ff_square_tab is always used with an offset; if this table
is marked as hidden, the compiler can infer that it and
therefore also ff_square_tab + 256 have a fixed offset
from the code. This allows to avoid performing "+ 256"
at runtime by baking it into the offset from the code to
the table.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-10-06 00:53:01 +02:00
parent ebcaa24274
commit b9133bce04
1 changed files with 3 additions and 1 deletions

View File

@ -21,9 +21,11 @@
#include <stdint.h>
#include "libavutil/attributes_internal.h"
#include "avcodec.h"
extern const uint32_t ff_square_tab[512];
extern const uint32_t attribute_visibility_hidden ff_square_tab[512];
/* minimum alignment rules ;)