diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-04-13 14:52:36 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-04-24 11:06:25 +0300 |
commit | b77fffa127663028169c5ed543956af4b9496c29 (patch) | |
tree | 0ad482e842fa0ce76c01ef0c452528e567148559 /libavcodec/h264.h | |
parent | 370ddc7b38d6b27b54fc2f5ee5f3dd9506f8c7c8 (diff) |
h264: make slice threading work with deblocking_filter=1
In such a case, decode the MBs in parallel without the loop filter, then
execute the filter serially.
The ref2frm array was previously moved to H264SliceContext. That was
incorrect, since it applies to all the slices and should properly be in
H264Context (it did not actually break decoding, since this distinction
only becomes relevant with slice threading and deblocking_filter=1,
which was not implemented before this commit). The ref2frm array is thus
moved back to H264Context.
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r-- | libavcodec/h264.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h index daad1be152..5c2c8109b2 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -392,7 +392,6 @@ typedef struct H264SliceContext { H264Ref ref_list[2][48]; /**< 0..15: frame refs, 16..47: mbaff field refs. * Reordered version of default_ref_list * according to picture reordering in slice header */ - int ref2frm[MAX_SLICES][2][64]; ///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1 const uint8_t *intra_pcm_ptr; int16_t *dc_val_base; @@ -470,6 +469,11 @@ typedef struct H264Context { int context_initialized; int flags; int workaround_bugs; + /* Set when slice threading is used and at least one slice uses deblocking + * mode 1 (i.e. across slice boundaries). Then we disable the loop filter + * during normal MB decoding and execute it serially at the end. + */ + int postpone_filter; int8_t(*intra4x4_pred_mode); H264PredContext hpc; @@ -591,12 +595,6 @@ typedef struct H264Context { int slice_context_count; - /** - * 1 if the single thread fallback warning has already been - * displayed, 0 otherwise. - */ - int single_decode_warning; - /** @} */ /** @@ -642,6 +640,7 @@ typedef struct H264Context { AVBufferPool *mb_type_pool; AVBufferPool *motion_val_pool; AVBufferPool *ref_index_pool; + int ref2frm[MAX_SLICES][2][64]; ///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1 } H264Context; extern const uint16_t ff_h264_mb_sizes[4]; |