diff options
author | Martin Storsjö <martin@martin.st> | 2022-03-29 15:34:19 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2022-03-30 14:53:55 +0300 |
commit | db54426975e124e98e5130ad01316cb7afd60630 (patch) | |
tree | 0041dc41a52aabdefa9fc513c0ac0b8fc600f328 /libavcodec/vc1dsp.h | |
parent | 3721aaeaaae9f817abb843117ae8dae1dc280a7f (diff) |
vc1dsp: Change remaining stride parameters to ptrdiff_t
The existing x86 assembly for loop filters uses the stride as a
full register without clearing/sign extending the upper half
of the registers on x86_64.
This avoids crashes if the caller would have passed nonzero bits
in the previously undefined upper 32 bits of the parameters.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/vc1dsp.h')
-rw-r--r-- | libavcodec/vc1dsp.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/vc1dsp.h b/libavcodec/vc1dsp.h index c6443acb20..fe60025a2a 100644 --- a/libavcodec/vc1dsp.h +++ b/libavcodec/vc1dsp.h @@ -42,16 +42,16 @@ typedef struct VC1DSPContext { void (*vc1_inv_trans_8x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block); void (*vc1_inv_trans_4x8_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block); void (*vc1_inv_trans_4x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block); - void (*vc1_v_overlap)(uint8_t *src, int stride); - void (*vc1_h_overlap)(uint8_t *src, int stride); + void (*vc1_v_overlap)(uint8_t *src, ptrdiff_t stride); + void (*vc1_h_overlap)(uint8_t *src, ptrdiff_t stride); void (*vc1_v_s_overlap)(int16_t *top, int16_t *bottom); - void (*vc1_h_s_overlap)(int16_t *left, int16_t *right, int left_stride, int right_stride, int flags); - void (*vc1_v_loop_filter4)(uint8_t *src, int stride, int pq); - void (*vc1_h_loop_filter4)(uint8_t *src, int stride, int pq); - void (*vc1_v_loop_filter8)(uint8_t *src, int stride, int pq); - void (*vc1_h_loop_filter8)(uint8_t *src, int stride, int pq); - void (*vc1_v_loop_filter16)(uint8_t *src, int stride, int pq); - void (*vc1_h_loop_filter16)(uint8_t *src, int stride, int pq); + void (*vc1_h_s_overlap)(int16_t *left, int16_t *right, ptrdiff_t left_stride, ptrdiff_t right_stride, int flags); + void (*vc1_v_loop_filter4)(uint8_t *src, ptrdiff_t stride, int pq); + void (*vc1_h_loop_filter4)(uint8_t *src, ptrdiff_t stride, int pq); + void (*vc1_v_loop_filter8)(uint8_t *src, ptrdiff_t stride, int pq); + void (*vc1_h_loop_filter8)(uint8_t *src, ptrdiff_t stride, int pq); + void (*vc1_v_loop_filter16)(uint8_t *src, ptrdiff_t stride, int pq); + void (*vc1_h_loop_filter16)(uint8_t *src, ptrdiff_t stride, int pq); /* put 8x8 block with bicubic interpolation and quarterpel precision * last argument is actually round value instead of height |