diff mbox

[FFmpeg-devel,v3] avcodec/mips: Fix failed case: hevc-conformance-AMP_A_Samsung_* when enable msa

Message ID 1545631664-5366-1-git-send-email-guxiwei-hf@loongson.cn
State Accepted
Commit f652c7a45c60427db0a89fae665e63b546af6ebb
Headers show

Commit Message

guxiwei Dec. 24, 2018, 6:07 a.m. UTC
The AV_INPUT_BUFFER_PADDING_SIZE has been increased to 64, but the value is still 32
in function ff_hevc_sao_edge_filter_8_msa. So, use AV_INPUT_BUFFER_PADDING_SIZE directly.
Also, use MAX_PB_SIZE directly instead of 64. Fate tests passed.
---
 libavcodec/mips/hevc_lpf_sao_msa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Derek Buitenhuis Dec. 24, 2018, 7:03 p.m. UTC | #1
On 24/12/2018 06:07, gxw wrote:
> The AV_INPUT_BUFFER_PADDING_SIZE has been increased to 64, but the value is still 32
> in function ff_hevc_sao_edge_filter_8_msa. So, use AV_INPUT_BUFFER_PADDING_SIZE directly.
> Also, use MAX_PB_SIZE directly instead of 64. Fate tests passed.
> ---
>   libavcodec/mips/hevc_lpf_sao_msa.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Probably OK.

- Derek
Michael Niedermayer Dec. 24, 2018, 9:15 p.m. UTC | #2
On Mon, Dec 24, 2018 at 07:03:45PM +0000, Derek Buitenhuis wrote:
> On 24/12/2018 06:07, gxw wrote:
> > The AV_INPUT_BUFFER_PADDING_SIZE has been increased to 64, but the value is still 32
> > in function ff_hevc_sao_edge_filter_8_msa. So, use AV_INPUT_BUFFER_PADDING_SIZE directly.
> > Also, use MAX_PB_SIZE directly instead of 64. Fate tests passed.
> > ---
> >   libavcodec/mips/hevc_lpf_sao_msa.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Probably OK.

tested on qemu-mips

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavcodec/mips/hevc_lpf_sao_msa.c b/libavcodec/mips/hevc_lpf_sao_msa.c
index 5b5537a..adcafde 100644
--- a/libavcodec/mips/hevc_lpf_sao_msa.c
+++ b/libavcodec/mips/hevc_lpf_sao_msa.c
@@ -2630,7 +2630,7 @@  void ff_hevc_sao_edge_filter_8_msa(uint8_t *dst, uint8_t *src,
                                    int16_t *sao_offset_val,
                                    int eo, int width, int height)
 {
-    ptrdiff_t stride_src = (2 * 64 + 32) / sizeof(uint8_t);
+    ptrdiff_t stride_src = (2 * MAX_PB_SIZE + AV_INPUT_BUFFER_PADDING_SIZE) / sizeof(uint8_t);
 
     switch (eo) {
     case 0: