diff mbox series

[FFmpeg-devel,16/18] avcodec/vvcdec: increase edge_emu_buffer for RPR

Message ID TYSPR06MB64338DE55C23B434B47181E5AAE82@TYSPR06MB6433.apcprd06.prod.outlook.com
State Accepted
Commit cae0b01282d0d21be24d619692c48ce3181d56dd
Headers show
Series [FFmpeg-devel,01/18] avcodec/vvcdec: misc, inter, use is_chroma instead of is_luma | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed

Commit Message

Nuo Mi May 19, 2024, 1:27 p.m. UTC
---
 libavcodec/vvc/ctu.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/vvc/ctu.h b/libavcodec/vvc/ctu.h
index 50109154aa..a987328d81 100644
--- a/libavcodec/vvc/ctu.h
+++ b/libavcodec/vvc/ctu.h
@@ -46,7 +46,8 @@ 
 #define MAX_QP                  63
 
 #define MAX_PB_SIZE             128
-#define EDGE_EMU_BUFFER_STRIDE  (MAX_PB_SIZE + 32)
+#define MAX_SCALING_RATIO       8
+#define EDGE_EMU_BUFFER_STRIDE  ((MAX_PB_SIZE + 32) * MAX_SCALING_RATIO)
 
 #define CHROMA_EXTRA_BEFORE     1
 #define CHROMA_EXTRA_AFTER      2
@@ -375,10 +376,8 @@  typedef struct VVCLocalContext {
     int     end_of_tiles_x;
     int     end_of_tiles_y;
 
-    /* +7 is for subpixel interpolation, *2 for high bit depths */
-    DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];
-    /* The extended size between the new edge emu buffer is abused by SAO */
-    DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer2)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];
+    /* *2 for high bit depths */
+    DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[EDGE_EMU_BUFFER_STRIDE * EDGE_EMU_BUFFER_STRIDE * 2];
     DECLARE_ALIGNED(32, int16_t, tmp)[MAX_PB_SIZE * MAX_PB_SIZE];
     DECLARE_ALIGNED(32, int16_t, tmp1)[MAX_PB_SIZE * MAX_PB_SIZE];
     DECLARE_ALIGNED(32, int16_t, tmp2)[MAX_PB_SIZE * MAX_PB_SIZE];