[FFmpeg-devel] [PATCH] avcodec: increase AV_INPUT_BUFFER_PADDING_SIZE to 64
James Almer
jamrial at gmail.com
Sun Jan 7 06:22:38 EET 2018
AVX-512 support has been introduced, and even if no functions currently
use zmm registers (able to load as much as 64 bytes of consecutive data
per instruction), they will be added eventually.
Signed-off-by: James Almer <jamrial at gmail.com>
---
Same rationale as when it was increased to 32 back in commit
67d29da4bd23057a1f646568442a77b844cb2d1b.
libavcodec/avcodec.h | 2 +-
libavcodec/x86/hevc_sao.asm | 2 +-
libavcodec/x86/hevc_sao_10bit.asm | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index c13deb599f..8fbbc798a2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -767,7 +767,7 @@ typedef struct AVCodecDescriptor {
* Note: If the first 23 bits of the additional bytes are not 0, then damaged
* MPEG bitstreams could cause overread and segfault.
*/
-#define AV_INPUT_BUFFER_PADDING_SIZE 32
+#define AV_INPUT_BUFFER_PADDING_SIZE 64
/**
* @ingroup lavc_encoding
diff --git a/libavcodec/x86/hevc_sao.asm b/libavcodec/x86/hevc_sao.asm
index 888a28afa7..756adfee57 100644
--- a/libavcodec/x86/hevc_sao.asm
+++ b/libavcodec/x86/hevc_sao.asm
@@ -198,7 +198,7 @@ HEVC_SAO_BAND_FILTER 64, 2
;******************************************************************************
%define MAX_PB_SIZE 64
-%define PADDING_SIZE 32 ; AV_INPUT_BUFFER_PADDING_SIZE
+%define PADDING_SIZE 64 ; AV_INPUT_BUFFER_PADDING_SIZE
%define EDGE_SRCSTRIDE 2 * MAX_PB_SIZE + PADDING_SIZE
%macro HEVC_SAO_EDGE_FILTER_INIT 0
diff --git a/libavcodec/x86/hevc_sao_10bit.asm b/libavcodec/x86/hevc_sao_10bit.asm
index f81e2d5033..b30583dd2f 100644
--- a/libavcodec/x86/hevc_sao_10bit.asm
+++ b/libavcodec/x86/hevc_sao_10bit.asm
@@ -190,7 +190,7 @@ HEVC_SAO_BAND_FILTER 12, 64, 4
;******************************************************************************
%define MAX_PB_SIZE 64
-%define PADDING_SIZE 32 ; AV_INPUT_BUFFER_PADDING_SIZE
+%define PADDING_SIZE 64 ; AV_INPUT_BUFFER_PADDING_SIZE
%define EDGE_SRCSTRIDE 2 * MAX_PB_SIZE + PADDING_SIZE
%macro PMINUW 4
--
2.15.0
More information about the ffmpeg-devel
mailing list