Commit db4234c5 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '07c5ca55'

* commit '07c5ca55':
  h264: move is_complex into the per-slice context

Conflicts:
	libavcodec/h264_slice.c
	libavcodec/svq3.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 70eec8f4 07c5ca55
......@@ -394,6 +394,7 @@ typedef struct H264SliceContext {
ptrdiff_t mb_uvlinesize;
int mb_skip_run;
int is_complex;
int redundant_pic_count;
......@@ -575,8 +576,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
......
......@@ -819,7 +819,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)) {
......
......@@ -2404,9 +2404,9 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
av_assert0(h->block_offset[15] == (4 * ((scan8[15] - scan8[0]) & 7) << h->pixel_shift) + 4 * h->linesize * ((scan8[15] - scan8[0]) >> 3));
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->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->er.error_status_table) {
const int start_i = av_clip(h->resync_mb_x + h->resync_mb_y * h->mb_width, 0, h->mb_num - 1);
......
......@@ -873,6 +873,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;
......@@ -894,8 +895,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->sps.chroma_format_idc = 1;
h->picture_structure = PICT_FRAME;
avctx->pix_fmt = AV_PIX_FMT_YUVJ420P;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment