summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h264.h3
-rw-r--r--libavcodec/h264_mb.c2
-rw-r--r--libavcodec/h264_slice.c6
-rw-r--r--libavcodec/svq3.c5
4 files changed, 9 insertions, 7 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 04ed625c37..0b29777f47 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -357,6 +357,7 @@ typedef struct H264SliceContext {
ptrdiff_t mb_uvlinesize;
int mb_skip_run;
+ int is_complex;
int redundant_pic_count;
@@ -532,8 +533,6 @@ typedef struct H264Context {
int mb_num;
int mb_xy;
- int is_complex;
-
// =============================================================
// Things below are not used in the MB or more inner code
diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c
index d29e2c632f..09d31ecfaf 100644
--- a/libavcodec/h264_mb.c
+++ b/libavcodec/h264_mb.c
@@ -814,7 +814,7 @@ void ff_h264_hl_decode_mb(H264Context *h, H264SliceContext *sl)
{
const int mb_xy = h->mb_xy;
const int mb_type = h->cur_pic.mb_type[mb_xy];
- int is_complex = CONFIG_SMALL || h->is_complex ||
+ int is_complex = CONFIG_SMALL || sl->is_complex ||
IS_INTRA_PCM(mb_type) || sl->qscale == 0;
if (CHROMA444(h)) {
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 43185c59b4..1e233ad27e 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -2185,9 +2185,9 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
sl->mb_skip_run = -1;
- h->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
- avctx->codec_id != AV_CODEC_ID_H264 ||
- (CONFIG_GRAY && (h->flags & CODEC_FLAG_GRAY));
+ sl->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
+ avctx->codec_id != AV_CODEC_ID_H264 ||
+ (CONFIG_GRAY && (h->flags & CODEC_FLAG_GRAY));
if (h->pps.cabac) {
/* realign */
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index d8aefa633e..cb418c6220 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -866,6 +866,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
{
SVQ3Context *s = avctx->priv_data;
H264Context *h = &s->h;
+ H264SliceContext *sl;
int m;
unsigned char *extradata;
unsigned char *extradata_end;
@@ -888,8 +889,10 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
ff_hpeldsp_init(&s->hdsp, avctx->flags);
ff_tpeldsp_init(&s->tdsp);
+ sl = h->slice_ctx;
+
h->flags = avctx->flags;
- h->is_complex = 1;
+ sl->is_complex = 1;
h->picture_structure = PICT_FRAME;
avctx->pix_fmt = AV_PIX_FMT_YUVJ420P;
avctx->color_range = AVCOL_RANGE_JPEG;