aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rv34.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2017-01-09 18:04:42 +0100
committerAnton Khirnov <anton@khirnov.net>2020-04-10 15:24:54 +0200
commit1f4cf92cfbd3accbae582ac63126ed5570ddfd37 (patch)
tree0d08c281a748689d53350a929fb0df022dc6ef2c /libavcodec/rv34.c
parent665e5b0fba41a8bae2269d9ce8929a24002e5907 (diff)
downloadffmpeg-1f4cf92cfbd3accbae582ac63126ed5570ddfd37.tar.gz
pthread_frame: merge the functionality for normal decoder init and init_thread_copy
The current design, where - proper init is called for the first per-thread context - first thread's private data is copied into private data for all the other threads - a "fixup" function is called for all the other threads to e.g. allocate dynamically allocated data is very fragile and hard to follow, so it is abandoned. Instead, the same init function is used to init each per-thread context. Where necessary, AVCodecInternal.is_copy can be used to differentiate between the first thread and the other ones (e.g. for decoding the extradata just once).
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r--libavcodec/rv34.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index f877258db6..ec0cd27916 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1529,34 +1529,6 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx)
return 0;
}
-int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx)
-{
- int err;
- RV34DecContext *r = avctx->priv_data;
-
- r->s.avctx = avctx;
-
- if (avctx->internal->is_copy) {
- r->tmp_b_block_base = NULL;
- r->cbp_chroma = NULL;
- r->cbp_luma = NULL;
- r->deblock_coefs = NULL;
- r->intra_types_hist = NULL;
- r->mb_type = NULL;
-
- ff_mpv_idct_init(&r->s);
-
- if ((err = ff_mpv_common_init(&r->s)) < 0)
- return err;
- if ((err = rv34_decoder_alloc(r)) < 0) {
- ff_mpv_common_end(&r->s);
- return err;
- }
- }
-
- return 0;
-}
-
int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
{
RV34DecContext *r = dst->priv_data, *r1 = src->priv_data;