diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2015-02-02 15:51:45 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-04 01:54:22 +0100 |
commit | 52f2adc015ba4a05c3da730e87b63b343747424d (patch) | |
tree | 81ebae92bd1e84784f159ce212310851573fbf95 /libavcodec/hevc.h | |
parent | 00fe77855b2aaf5de5bfe4d566a4ddd80aa6812e (diff) | |
download | ffmpeg-52f2adc015ba4a05c3da730e87b63b343747424d.tar.gz |
avcodec/hevc: Update the USE_SAO_SMALL_BUFFER case for the alignment requirements in FFmpeg
Use edge emu buffers
And enable the code unconditionally
Speed difference without USE_SAO_SMALL_BUFFER and with the new code:
Decicycles: 26772->26220 (BO32), 83803->80942 (BO64)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.h')
-rw-r--r-- | libavcodec/hevc.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h index 482341af76..ae9a32acf0 100644 --- a/libavcodec/hevc.h +++ b/libavcodec/hevc.h @@ -36,8 +36,6 @@ #include "thread.h" #include "videodsp.h" -//#define USE_SAO_SMALL_BUFFER /* reduce the memory used by SAO */ - #define MAX_DPB_SIZE 16 // A.4.1 #define MAX_REFS 16 @@ -747,9 +745,6 @@ typedef struct HEVCNAL { } HEVCNAL; typedef struct HEVCLocalContext { -#ifdef USE_SAO_SMALL_BUFFER - uint8_t *sao_pixel_buffer; -#endif uint8_t cabac_state[HEVC_CONTEXTS]; uint8_t stat_coeff[4]; @@ -774,6 +769,7 @@ typedef struct HEVCLocalContext { 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]; DECLARE_ALIGNED(16, int16_t, tmp [MAX_PB_SIZE * MAX_PB_SIZE]); @@ -813,13 +809,8 @@ typedef struct HEVCContext { AVFrame *frame; AVFrame *output_frame; -#ifdef USE_SAO_SMALL_BUFFER uint8_t *sao_pixel_buffer_h[3]; uint8_t *sao_pixel_buffer_v[3]; -#else - AVFrame *tmp_frame; - AVFrame *sao_frame; -#endif const HEVCVPS *vps; const HEVCSPS *sps; |