[FFmpeg-cvslog] h264: drop tests whether the codec id is AV_CODEC_ID_H264

Anton Khirnov git at videolan.org
Tue Aug 2 00:41:34 EEST 2016


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed May 18 14:33:33 2016 +0200| [bc7f4268514624e1286ea76d27a89a56b4ee18e1] | committer: Anton Khirnov

h264: drop tests whether the codec id is AV_CODEC_ID_H264

Those are unused remnants of the old SVQ3 code.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc7f4268514624e1286ea76d27a89a56b4ee18e1
---

 libavcodec/h264_slice.c | 1 -
 libavcodec/h264dec.c    | 8 +++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 376be27..eee222f 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -2111,7 +2111,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->ps.pps->cabac) {
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 52cb9ae..cc5bdca 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -371,11 +371,9 @@ 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)
-            h->avctx->framerate.num *= 2;
-        avctx->ticks_per_frame = 2;
-    }
+    if (avctx->ticks_per_frame == 1)
+        h->avctx->framerate.num *= 2;
+    avctx->ticks_per_frame = 2;
 
     if (avctx->extradata_size > 0 && avctx->extradata) {
        ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,



More information about the ffmpeg-cvslog mailing list