Commit 91ed4e71 authored by Derek Buitenhuis's avatar Derek Buitenhuis Committed by Michael Niedermayer

avcodec: Mark some codecs with threadsafe init as such

Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8efb7f5a
...@@ -159,4 +159,5 @@ AVCodec ff_aasc_decoder = { ...@@ -159,4 +159,5 @@ AVCodec ff_aasc_decoder = {
.close = aasc_decode_end, .close = aasc_decode_end,
.decode = aasc_decode_frame, .decode = aasc_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -492,4 +492,5 @@ AVCodec ff_aic_decoder = { ...@@ -492,4 +492,5 @@ AVCodec ff_aic_decoder = {
.decode = aic_decode_frame, .decode = aic_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.init_thread_copy = ONLY_IF_THREADS_ENABLED(aic_decode_init), .init_thread_copy = ONLY_IF_THREADS_ENABLED(aic_decode_init),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -199,4 +199,5 @@ AVCodec ff_anm_decoder = { ...@@ -199,4 +199,5 @@ AVCodec ff_anm_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -482,4 +482,5 @@ AVCodec ff_ansi_decoder = { ...@@ -482,4 +482,5 @@ AVCodec ff_ansi_decoder = {
.close = decode_close, .close = decode_close,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -105,4 +105,5 @@ AVCodec ff_aura2_decoder = { ...@@ -105,4 +105,5 @@ AVCodec ff_aura2_decoder = {
.init = aura_decode_init, .init = aura_decode_init,
.decode = aura_decode_frame, .decode = aura_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -170,4 +170,5 @@ AVCodec ff_avrn_decoder = { ...@@ -170,4 +170,5 @@ AVCodec ff_avrn_decoder = {
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.max_lowres = 3, .max_lowres = 3,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -186,4 +186,5 @@ AVCodec ff_avs_decoder = { ...@@ -186,4 +186,5 @@ AVCodec ff_avs_decoder = {
.decode = avs_decode_frame, .decode = avs_decode_frame,
.close = avs_decode_end, .close = avs_decode_end,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -127,4 +127,5 @@ AVCodec ff_avui_decoder = { ...@@ -127,4 +127,5 @@ AVCodec ff_avui_decoder = {
.init = avui_decode_init, .init = avui_decode_init,
.decode = avui_decode_frame, .decode = avui_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -163,4 +163,5 @@ AVCodec ff_bethsoftvid_decoder = { ...@@ -163,4 +163,5 @@ AVCodec ff_bethsoftvid_decoder = {
.close = bethsoftvid_decode_end, .close = bethsoftvid_decode_end,
.decode = bethsoftvid_decode_frame, .decode = bethsoftvid_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -185,4 +185,5 @@ AVCodec ff_bfi_decoder = { ...@@ -185,4 +185,5 @@ AVCodec ff_bfi_decoder = {
.close = bfi_decode_close, .close = bfi_decode_close,
.decode = bfi_decode_frame, .decode = bfi_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -295,4 +295,5 @@ AVCodec ff_bmv_video_decoder = { ...@@ -295,4 +295,5 @@ AVCodec ff_bmv_video_decoder = {
.init = decode_init, .init = decode_init,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -269,4 +269,5 @@ AVCodec ff_c93_decoder = { ...@@ -269,4 +269,5 @@ AVCodec ff_c93_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -496,4 +496,5 @@ AVCodec ff_cllc_decoder = { ...@@ -496,4 +496,5 @@ AVCodec ff_cllc_decoder = {
.decode = cllc_decode_frame, .decode = cllc_decode_frame,
.close = cllc_decode_close, .close = cllc_decode_close,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -185,6 +185,7 @@ AVCodec ff_aura_decoder = { ...@@ -185,6 +185,7 @@ AVCodec ff_aura_decoder = {
.init = cyuv_decode_init, .init = cyuv_decode_init,
.decode = cyuv_decode_frame, .decode = cyuv_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -198,5 +199,6 @@ AVCodec ff_cyuv_decoder = { ...@@ -198,5 +199,6 @@ AVCodec ff_cyuv_decoder = {
.init = cyuv_decode_init, .init = cyuv_decode_init,
.decode = cyuv_decode_frame, .decode = cyuv_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -350,4 +350,5 @@ AVCodec ff_fraps_decoder = { ...@@ -350,4 +350,5 @@ AVCodec ff_fraps_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -642,6 +642,7 @@ AVCodec ff_mszh_decoder = { ...@@ -642,6 +642,7 @@ AVCodec ff_mszh_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -656,5 +657,6 @@ AVCodec ff_zlib_decoder = { ...@@ -656,5 +657,6 @@ AVCodec ff_zlib_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -1525,6 +1525,7 @@ AVCodec ff_apng_decoder = { ...@@ -1525,6 +1525,7 @@ AVCodec ff_apng_decoder = {
.init_thread_copy = ONLY_IF_THREADS_ENABLED(png_dec_init), .init_thread_copy = ONLY_IF_THREADS_ENABLED(png_dec_init),
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -1541,6 +1542,6 @@ AVCodec ff_png_decoder = { ...@@ -1541,6 +1542,6 @@ AVCodec ff_png_decoder = {
.init_thread_copy = ONLY_IF_THREADS_ENABLED(png_dec_init), .init_thread_copy = ONLY_IF_THREADS_ENABLED(png_dec_init),
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context), .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
.caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -104,6 +104,7 @@ AVCodec ff_r210_decoder = { ...@@ -104,6 +104,7 @@ AVCodec ff_r210_decoder = {
.init = decode_init, .init = decode_init,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
#if CONFIG_R10K_DECODER #if CONFIG_R10K_DECODER
...@@ -115,6 +116,7 @@ AVCodec ff_r10k_decoder = { ...@@ -115,6 +116,7 @@ AVCodec ff_r10k_decoder = {
.init = decode_init, .init = decode_init,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
#if CONFIG_AVRP_DECODER #if CONFIG_AVRP_DECODER
...@@ -126,5 +128,6 @@ AVCodec ff_avrp_decoder = { ...@@ -126,5 +128,6 @@ AVCodec ff_avrp_decoder = {
.init = decode_init, .init = decode_init,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "bswapdsp.h" #include "bswapdsp.h"
#include "bytestream.h" #include "bytestream.h"
#include "get_bits.h" #include "get_bits.h"
#include "internal.h"
#include "thread.h" #include "thread.h"
#include "utvideo.h" #include "utvideo.h"
...@@ -941,4 +942,5 @@ AVCodec ff_utvideo_decoder = { ...@@ -941,4 +942,5 @@ AVCodec ff_utvideo_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -88,6 +88,7 @@ AVCodec ff_ayuv_decoder = { ...@@ -88,6 +88,7 @@ AVCodec ff_ayuv_decoder = {
.init = v408_decode_init, .init = v408_decode_init,
.decode = v408_decode_frame, .decode = v408_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
#if CONFIG_V408_DECODER #if CONFIG_V408_DECODER
...@@ -99,5 +100,6 @@ AVCodec ff_v408_decoder = { ...@@ -99,5 +100,6 @@ AVCodec ff_v408_decoder = {
.init = v408_decode_init, .init = v408_decode_init,
.decode = v408_decode_frame, .decode = v408_decode_frame,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
#endif #endif
...@@ -215,4 +215,5 @@ AVCodec ff_vble_decoder = { ...@@ -215,4 +215,5 @@ AVCodec ff_vble_decoder = {
.decode = vble_decode_frame, .decode = vble_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.init_thread_copy = ONLY_IF_THREADS_ENABLED(vble_decode_init), .init_thread_copy = ONLY_IF_THREADS_ENABLED(vble_decode_init),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
...@@ -149,4 +149,5 @@ AVCodec ff_zerocodec_decoder = { ...@@ -149,4 +149,5 @@ AVCodec ff_zerocodec_decoder = {
.decode = zerocodec_decode_frame, .decode = zerocodec_decode_frame,
.close = zerocodec_decode_close, .close = zerocodec_decode_close,
.capabilities = AV_CODEC_CAP_DR1, .capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}; };
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