avcodec/mips: Fix failed case: hevc-conformance-AMP_A_Samsung_* when enable msa
authorgxw <guxiwei-hf@loongson.cn>
Mon, 24 Dec 2018 06:07:44 +0000 (14:07 +0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 14 Jan 2019 23:57:27 +0000 (00:57 +0100)
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.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f652c7a45c60427db0a89fae665e63b546af6ebb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mips/hevc_lpf_sao_msa.c

index da1db51..e1bfaa0 100644 (file)
@@ -1970,7 +1970,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: