summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-17 22:28:46 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:15 +0100
commit36d04801ba9d8622c2d759c172aea18561bac74d (patch)
tree24ad5e5b12360b0ba4b2498d79d0d2da930c911a /libavcodec/h264.h
parent34d4c605e9a5116d5289b35633ade5b01cacab24 (diff)
h264: move the scratch buffers into the per-slice context
Also change the method for allocating them. Instead of two possible alloc calls from different places, just ensure they are allocated at the start of each slice. This should be simpler and less bug-prone than the previous method.
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index cf4bc1e1fd..2c41584450 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -399,6 +399,11 @@ typedef struct H264SliceContext {
const uint8_t *intra_pcm_ptr;
+ uint8_t *bipred_scratchpad;
+ uint8_t *edge_emu_buffer;
+ int bipred_scratchpad_allocated;
+ int edge_emu_buffer_allocated;
+
/**
* non zero coeff count cache.
* is 64 if not available.
@@ -708,8 +713,6 @@ typedef struct H264Context {
int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs
int cur_chroma_format_idc;
- uint8_t *bipred_scratchpad;
- uint8_t *edge_emu_buffer;
int16_t *dc_val_base;
AVBufferPool *qscale_table_pool;