diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-03-22 13:31:21 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-04-24 10:06:23 +0200 |
commit | 3176217c60ca7828712985092d9102d331ea4f3d (patch) | |
tree | 1124709788c4b1b3ec4da9cd8e204cc63039cc8f /libavcodec/h264_direct.c | |
parent | 44d16df413878588659dd8901bba016b5a869fd1 (diff) | |
download | ffmpeg-3176217c60ca7828712985092d9102d331ea4f3d.tar.gz |
h264: decouple h264_ps from the h264 decoder
Make the SPS/PPS parsing independent of the H264Context, to allow
decoupling the parser from the decoder. The change is modelled after the
one done earlier for HEVC.
Move the dequant buffers to the PPS to avoid complex checks whether they
changed and an expensive copy for frame threads.
Diffstat (limited to 'libavcodec/h264_direct.c')
-rw-r--r-- | libavcodec/h264_direct.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index a7966e15e9..391f8f1d6a 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -310,7 +310,7 @@ single_col: *mb_type |= MB_TYPE_DIRECT2 | (mb_type_col[0] & (MB_TYPE_16x8 | MB_TYPE_8x16)); } else { - if (!h->sps.direct_8x8_inference_flag) { + if (!h->ps.sps->direct_8x8_inference_flag) { /* FIXME: Save sub mb types from previous frames (or derive * from MVs) so we know exactly what block size to use. */ sub_mb_type += (MB_TYPE_8x8 - MB_TYPE_16x16); /* B_SUB_4x4 */ @@ -533,7 +533,7 @@ single_col: *mb_type |= MB_TYPE_L0L1 | MB_TYPE_DIRECT2 | (mb_type_col[0] & (MB_TYPE_16x8 | MB_TYPE_8x16)); } else { - if (!h->sps.direct_8x8_inference_flag) { + if (!h->ps.sps->direct_8x8_inference_flag) { /* FIXME: save sub mb types from previous frames (or derive * from MVs) so we know exactly what block size to use */ sub_mb_type = MB_TYPE_8x8 | MB_TYPE_P0L0 | MB_TYPE_P0L1 | @@ -574,7 +574,7 @@ single_col: if (IS_INTERLACED(*mb_type) != IS_INTERLACED(mb_type_col[0])) { int y_shift = 2 * !IS_INTERLACED(*mb_type); - assert(h->sps.direct_8x8_inference_flag); + assert(h->ps.sps->direct_8x8_inference_flag); for (i8 = 0; i8 < 4; i8++) { const int x8 = i8 & 1; |