avcodec/hpeldsp: Make put_no_rnd_pixels_tab smaller

Only the blocksizes 16 and 8 are implemented, yet the motion estimation
code touches the blocksize 4 entries. But really nothing touches
the blocksize 2 entries, so that we can reduce the put_no_rnd_pixels_tab
array size to [3][4].

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-09-22 05:41:04 +02:00
parent c7161befb4
commit 262791b8d8

View File

@@ -77,10 +77,10 @@ typedef struct HpelDSPContext {
* @param pixels source
* @param line_size number of bytes in a horizontal line of block
* @param h height
* @note The size is kept at [4][4] to match the above pixel_tabs and avoid
* out of bounds reads in the motion estimation code.
* @note The size is kept at [3][4] to avoid out of bounds accesses
* in the motion estimation code.
*/
op_pixels_func put_no_rnd_pixels_tab[4][4];
op_pixels_func put_no_rnd_pixels_tab[3][4];
/**
* Halfpel motion compensation with no rounding (a+b)>>1.