[FFmpeg-cvslog] Merge commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1'
James Almer
git at videolan.org
Tue Aug 2 00:41:35 EEST 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Aug 1 18:15:07 2016 -0300| [517dd04f6df3103a6f2bc20b43b956d055ad983f] | committer: James Almer
Merge commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1'
* commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1':
h264: drop tests whether the codec id is AV_CODEC_ID_H264
Conflicts:
libavcodec/h264dec.c
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=517dd04f6df3103a6f2bc20b43b956d055ad983f
---
libavcodec/h264_slice.c | 1 -
libavcodec/h264dec.c | 14 ++++++--------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index fcc8443..7d1817c 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -2349,7 +2349,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
sl->deblocking_filter = 0;
sl->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
- avctx->codec_id != AV_CODEC_ID_H264 ||
(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));
if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->slice_ctx[0].er.error_status_table) {
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index d944a8c..323639d 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -406,15 +406,13 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx)
return AVERROR_UNKNOWN;
}
- if (avctx->codec_id == AV_CODEC_ID_H264) {
- if (avctx->ticks_per_frame == 1) {
- if(h->avctx->time_base.den < INT_MAX/2) {
- h->avctx->time_base.den *= 2;
- } else
- h->avctx->time_base.num /= 2;
- }
- avctx->ticks_per_frame = 2;
+ if (avctx->ticks_per_frame == 1) {
+ if(h->avctx->time_base.den < INT_MAX/2) {
+ h->avctx->time_base.den *= 2;
+ } else
+ h->avctx->time_base.num /= 2;
}
+ avctx->ticks_per_frame = 2;
if (avctx->extradata_size > 0 && avctx->extradata) {
ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
======================================================================
diff --cc libavcodec/h264_slice.c
index fcc8443,eee222f..7d1817c
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@@ -2349,19 -2111,8 +2349,18 @@@ static int decode_slice(struct AVCodecC
sl->deblocking_filter = 0;
sl->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
- avctx->codec_id != AV_CODEC_ID_H264 ||
(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));
+ if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->slice_ctx[0].er.error_status_table) {
+ const int start_i = av_clip(sl->resync_mb_x + sl->resync_mb_y * h->mb_width, 0, h->mb_num - 1);
+ if (start_i) {
+ int prev_status = h->slice_ctx[0].er.error_status_table[h->slice_ctx[0].er.mb_index2xy[start_i - 1]];
+ prev_status &= ~ VP_START;
+ if (prev_status != (ER_MV_END | ER_DC_END | ER_AC_END))
+ h->slice_ctx[0].er.error_occurred = 1;
+ }
+ }
+
if (h->ps.pps->cabac) {
/* realign */
align_get_bits(&sl->gb);
diff --cc libavcodec/h264dec.c
index d944a8c,cc5bdca..323639d
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@@ -406,24 -371,18 +406,22 @@@ av_cold int ff_h264_decode_init(AVCodec
return AVERROR_UNKNOWN;
}
- if (avctx->codec_id == AV_CODEC_ID_H264) {
- if (avctx->ticks_per_frame == 1) {
- if(h->avctx->time_base.den < INT_MAX/2) {
- h->avctx->time_base.den *= 2;
- } else
- h->avctx->time_base.num /= 2;
- }
- avctx->ticks_per_frame = 2;
- if (avctx->ticks_per_frame == 1)
- h->avctx->framerate.num *= 2;
++ if (avctx->ticks_per_frame == 1) {
++ if(h->avctx->time_base.den < INT_MAX/2) {
++ h->avctx->time_base.den *= 2;
++ } else
++ h->avctx->time_base.num /= 2;
+ }
+ avctx->ticks_per_frame = 2;
if (avctx->extradata_size > 0 && avctx->extradata) {
- ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
- &h->ps, &h->is_avc, &h->nal_length_size,
- avctx->err_recognition, avctx);
- if (ret < 0) {
- h264_decode_end(avctx);
- return ret;
- }
+ ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
+ &h->ps, &h->is_avc, &h->nal_length_size,
+ avctx->err_recognition, avctx);
+ if (ret < 0) {
+ h264_decode_end(avctx);
+ return ret;
+ }
}
if (h->ps.sps && h->ps.sps->bitstream_restriction_flag &&
More information about the ffmpeg-cvslog
mailing list