diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-27 22:21:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-11 20:16:49 +0200 |
commit | 69cfe63a43f43207f72fd677c47eafcf58fcfd13 (patch) | |
tree | 856cf4fabbfdf18c75bf67470fe01c5566172feb /libavcodec/ffv1enc.c | |
parent | 44f69c0df8c1d12b450c01ac151d850bf6a8a5b6 (diff) | |
download | ffmpeg-69cfe63a43f43207f72fd677c47eafcf58fcfd13.tar.gz |
ffv1: Switch to ThreadFrame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r-- | libavcodec/ffv1enc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 828ed9b6e0..79e483d6dd 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -794,7 +794,7 @@ static av_cold int encode_init(AVCodecContext *avctx) if ((ret = ffv1_allocate_initial_states(s)) < 0) return ret; - avctx->coded_frame = &s->picture; + avctx->coded_frame = s->picture.f; if (!s->transparency) s->plane_count = 2; avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift); @@ -939,12 +939,12 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs) put_symbol(c, state, f->plane[j].quant_table_index, 0); av_assert0(f->plane[j].quant_table_index == f->avctx->context_model); } - if (!f->picture.interlaced_frame) + if (!f->picture.f->interlaced_frame) put_symbol(c, state, 3, 0); else - put_symbol(c, state, 1 + !f->picture.top_field_first, 0); - put_symbol(c, state, f->picture.sample_aspect_ratio.num, 0); - put_symbol(c, state, f->picture.sample_aspect_ratio.den, 0); + put_symbol(c, state, 1 + !f->picture.f->top_field_first, 0); + put_symbol(c, state, f->picture.f->sample_aspect_ratio.num, 0); + put_symbol(c, state, f->picture.f->sample_aspect_ratio.den, 0); } static int encode_slice(AVCodecContext *c, void *arg) @@ -955,7 +955,7 @@ static int encode_slice(AVCodecContext *c, void *arg) int height = fs->slice_height; int x = fs->slice_x; int y = fs->slice_y; - AVFrame *const p = &f->picture; + AVFrame *const p = f->picture.f; const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step_minus1 + 1; if (p->key_frame) @@ -1002,7 +1002,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, { FFV1Context *f = avctx->priv_data; RangeCoder *const c = &f->slice_context[0]->c; - AVFrame *const p = &f->picture; + AVFrame *const p = f->picture.f; int used_count = 0; uint8_t keystate = 128; uint8_t *buf_p; @@ -1015,7 +1015,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, ff_init_range_encoder(c, pkt->data, pkt->size); ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8); - *p = *pict; + av_frame_ref(p, pict); p->pict_type = AV_PICTURE_TYPE_I; if (avctx->gop_size == 0 || f->picture_number % avctx->gop_size == 0) { |