Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2015-01-13 01:09:23 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-02-04 03:54:01 +0300
commitda81cc38e8a90071484508fbdd8fb888dc9a4b7b (patch)
tree51df6e7f3b192aa3a0c189aa70746a68bb74fb92 /libavcodec/hevc.h
parentb737a2c52857b214be246ff615c6293730033cfa (diff)
avcodec/hevc: reduce memory for SAO
cherry picked from commit 5d9f79edef2c11b915bdac3a025b59a32082f409 SAO edge filter uses pre-SAO pixel data on the left and top of the ctb, so this data must be kept available. This was done previously by having 2 copies of the frame, one before and one after SAO. This commit reduces the storage to just that, instead of the previous whole frame. Commit message taken from patch by Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.h')
-rw-r--r--libavcodec/hevc.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
index 1727b6097d..482341af76 100644
--- a/libavcodec/hevc.h
+++ b/libavcodec/hevc.h
@@ -36,6 +36,8 @@
#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
@@ -745,6 +747,9 @@ 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];
@@ -807,9 +812,14 @@ typedef struct HEVCContext {
uint8_t slice_initialized;
AVFrame *frame;
- AVFrame *sao_frame;
- AVFrame *tmp_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;