diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 16:03:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 16:03:23 +0100 |
commit | 392080cbe52868c00f8dfd4e60639c37a13165f4 (patch) | |
tree | 3039ea6b0b267230503f674a0c355cc73049e2c6 /libavcodec/h264.c | |
parent | f25f15b6e1c4f597b0d31fb5b9fe7e8e40dd0fb1 (diff) | |
parent | 167e004e1aca7765686ed95d7cd8ea5064d4f6f6 (diff) | |
download | ffmpeg-392080cbe52868c00f8dfd4e60639c37a13165f4.tar.gz |
Merge commit '167e004e1aca7765686ed95d7cd8ea5064d4f6f6'
* commit '167e004e1aca7765686ed95d7cd8ea5064d4f6f6':
h264: drop any pretense of support for data partitioning
Conflicts:
libavcodec/h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3bd2305da8..be128adf68 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1544,7 +1544,6 @@ again: init_get_bits(&hx->gb, ptr, bit_length); hx->intra_gb_ptr = hx->inter_gb_ptr = &hx->gb; - hx->data_partitioning = 0; if ((err = ff_h264_decode_slice_header(hx, h))) break; @@ -1615,49 +1614,11 @@ again: } break; case NAL_DPA: - if (h->avctx->flags & CODEC_FLAG2_CHUNKS) { - av_log(h->avctx, AV_LOG_ERROR, - "Decoding in chunks is not supported for " - "partitioned slices.\n"); - return AVERROR(ENOSYS); - } - - init_get_bits(&hx->gb, ptr, bit_length); - hx->intra_gb_ptr = - hx->inter_gb_ptr = NULL; - - if ((err = ff_h264_decode_slice_header(hx, h))) { - /* make sure data_partitioning is cleared if it was set - * before, so we don't try decoding a slice without a valid - * slice header later */ - h->data_partitioning = 0; - break; - } - - hx->data_partitioning = 1; - break; case NAL_DPB: - init_get_bits(&hx->intra_gb, ptr, bit_length); - hx->intra_gb_ptr = &hx->intra_gb; - break; case NAL_DPC: - init_get_bits(&hx->inter_gb, ptr, bit_length); - hx->inter_gb_ptr = &hx->inter_gb; - - av_log(h->avctx, AV_LOG_ERROR, "Partitioned H.264 support is incomplete\n"); - break; - - if (hx->redundant_pic_count == 0 && - hx->intra_gb_ptr && - hx->data_partitioning && - h->cur_pic_ptr && h->context_initialized && - (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc) && - (avctx->skip_frame < AVDISCARD_BIDIR || - hx->slice_type_nos != AV_PICTURE_TYPE_B) && - (avctx->skip_frame < AVDISCARD_NONINTRA || - hx->slice_type_nos == AV_PICTURE_TYPE_I) && - avctx->skip_frame < AVDISCARD_ALL) - context_count++; + avpriv_request_sample(avctx, "data partitioning"); + ret = AVERROR(ENOSYS); + goto end; break; case NAL_SEI: init_get_bits(&h->gb, ptr, bit_length); @@ -1814,9 +1775,6 @@ static int h264_decode_frame(AVCodecContext *avctx, void *data, int ret; h->flags = avctx->flags; - /* reset data partitioning here, to ensure GetBitContexts from previous - * packets do not get used. */ - h->data_partitioning = 0; ff_h264_unref_picture(h, &h->last_pic_for_ec); |