Showing the changes to libavcodec (34 of 34 files). Show all
Unified · Split
| @@ -151,7 +151,7 @@ static int d3d12va_av1_end_frame(AVCodecContext *avctx) · 150 unmodified lines | ||
| 151 | 151 | return ret; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | −static int d3d12va_av1_decode_init(AVCodecContext *avctx) | |
| 154 | +static av_cold int d3d12va_av1_decode_init(AVCodecContext *avctx) | |
| 155 | 155 | { |
| 156 | 156 | D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); |
| 157 | 157 | D3D12AV1DecodeContext *av1_ctx = D3D12_AV1_DECODE_CONTEXT(avctx); |
| @@ -179,7 +179,7 @@ static int d3d12va_av1_decode_init(AVCodecContext *avctx) · 21 unmodified lines | ||
| 179 | 179 | return 0; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | −static int d3d12va_av1_decode_uninit(AVCodecContext *avctx) | |
| 182 | +static av_cold int d3d12va_av1_decode_uninit(AVCodecContext *avctx) | |
| 183 | 183 | { |
| 184 | 184 | D3D12AV1DecodeContext *ctx = D3D12_AV1_DECODE_CONTEXT(avctx); |
| 185 | 185 | |
| @@ -280,7 +280,7 @@ int ff_d3d12va_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames · 279 unmodified lines | ||
| 280 | 280 | return 0; |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | −int ff_d3d12va_decode_init(AVCodecContext *avctx) | |
| 283 | +av_cold int ff_d3d12va_decode_init(AVCodecContext *avctx) | |
| 284 | 284 | { |
| 285 | 285 | int ret; |
| 286 | 286 | AVHWFramesContext *frames_ctx; |
| @@ -370,7 +370,7 @@ fail: · 83 unmodified lines | ||
| 370 | 370 | return AVERROR(EINVAL); |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | −int ff_d3d12va_decode_uninit(AVCodecContext *avctx) | |
| 373 | +av_cold int ff_d3d12va_decode_uninit(AVCodecContext *avctx) | |
| 374 | 374 | { |
| 375 | 375 | int num_allocator = 0; |
| 376 | 376 | D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); |
| @@ -173,7 +173,7 @@ static int d3d12va_h264_end_frame(AVCodecContext *avctx) · 172 unmodified lines | ||
| 173 | 173 | return ret; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | −static int d3d12va_h264_decode_init(AVCodecContext *avctx) | |
| 176 | +static av_cold int d3d12va_h264_decode_init(AVCodecContext *avctx) | |
| 177 | 177 | { |
| 178 | 178 | D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); |
| 179 | 179 | DXVA_PicParams_H264 pp; |
| @@ -160,7 +160,7 @@ static int d3d12va_hevc_end_frame(AVCodecContext *avctx) · 159 unmodified lines | ||
| 160 | 160 | scale ? &ctx_pic->qm : NULL, scale ? sizeof(ctx_pic->qm) : 0, update_input_arguments); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | −static int d3d12va_hevc_decode_init(AVCodecContext *avctx) | |
| 163 | +static av_cold int d3d12va_hevc_decode_init(AVCodecContext *avctx) | |
| 164 | 164 | { |
| 165 | 165 | D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); |
| 166 | 166 | DXVA_PicParams_HEVC pp; |
| @@ -150,7 +150,7 @@ static int d3d12va_mpeg2_end_frame(AVCodecContext *avctx) · 149 unmodified lines | ||
| 150 | 150 | return ret; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | −static int d3d12va_mpeg2_decode_init(AVCodecContext *avctx) | |
| 153 | +static av_cold int d3d12va_mpeg2_decode_init(AVCodecContext *avctx) | |
| 154 | 154 | { |
| 155 | 155 | D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); |
| 156 | 156 | |
| @@ -162,7 +162,7 @@ static int d3d12va_vc1_end_frame(AVCodecContext *avctx) · 161 unmodified lines | ||
| 162 | 162 | update_input_arguments); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | −static int d3d12va_vc1_decode_init(AVCodecContext *avctx) | |
| 165 | +static av_cold int d3d12va_vc1_decode_init(AVCodecContext *avctx) | |
| 166 | 166 | { |
| 167 | 167 | int ret; |
| 168 | 168 | D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); |
| @@ -126,7 +126,7 @@ static int d3d12va_vp9_end_frame(AVCodecContext *avctx) · 125 unmodified lines | ||
| 126 | 126 | &ctx_pic->pp, sizeof(ctx_pic->pp), NULL, 0, update_input_arguments); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | −static int d3d12va_vp9_decode_init(AVCodecContext *avctx) | |
| 129 | +static av_cold int d3d12va_vp9_decode_init(AVCodecContext *avctx) | |
| 130 | 130 | { |
| 131 | 131 | D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); |
| 132 | 132 | DXVA_PicParams_VP9 pp; |
| @@ -199,7 +199,7 @@ static av_cold void dcaenc_init_static_tables(void) · 198 unmodified lines | ||
| 199 | 199 | create_enc_table(&bitalloc_12_table[i][1], 12, &src_table); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | −static int encode_init(AVCodecContext *avctx) | |
| 202 | +static av_cold int encode_init(AVCodecContext *avctx) | |
| 203 | 203 | { |
| 204 | 204 | static AVOnce init_static_once = AV_ONCE_INIT; |
| 205 | 205 | DCAEncContext *c = avctx->priv_data; |
| @@ -442,7 +442,7 @@ static int bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf) · 441 unmodified lines | ||
| 442 | 442 | return 0; |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | −static int dvdsub_init(AVCodecContext *avctx) | |
| 445 | +static av_cold int dvdsub_init(AVCodecContext *avctx) | |
| 446 | 446 | { |
| 447 | 447 | DVDSubtitleContext *dvdc = avctx->priv_data; |
| 448 | 448 | static const uint32_t default_palette[16] = { |
| @@ -1053,7 +1053,7 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, · 1052 unmodified lines | ||
| 1053 | 1053 | return avpkt->size; |
| 1054 | 1054 | } |
| 1055 | 1055 | |
| 1056 | −static int dxv_init(AVCodecContext *avctx) | |
| 1056 | +static av_cold int dxv_init(AVCodecContext *avctx) | |
| 1057 | 1057 | { |
| 1058 | 1058 | DXVContext *ctx = avctx->priv_data; |
| 1059 | 1059 | int ret = av_image_check_size(avctx->width, avctx->height, 0, avctx); |
| @@ -1073,7 +1073,7 @@ static int dxv_init(AVCodecContext *avctx) · 13 unmodified lines | ||
| 1073 | 1073 | return 0; |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | −static int dxv_close(AVCodecContext *avctx) | |
| 1076 | +static av_cold int dxv_close(AVCodecContext *avctx) | |
| 1077 | 1077 | { |
| 1078 | 1078 | DXVContext *ctx = avctx->priv_data; |
| 1079 | 1079 | |
| @@ -450,7 +450,7 @@ static int dxva2_av1_end_frame(AVCodecContext *avctx) · 449 unmodified lines | ||
| 450 | 450 | return ret; |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | −static int dxva2_av1_uninit(AVCodecContext *avctx) | |
| 453 | +static av_cold int dxva2_av1_uninit(AVCodecContext *avctx) | |
| 454 | 454 | { |
| 455 | 455 | struct AV1DXVAContext *ctx = avctx->internal->hwaccel_priv_data; |
| 456 | 456 | |
| @@ -909,7 +909,7 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx, · 908 unmodified lines | ||
| 909 | 909 | return av_pix_fmt_get_chroma_sub_sample(pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift); |
| 910 | 910 | } |
| 911 | 911 | |
| 912 | −static int encode_init_internal(AVCodecContext *avctx) | |
| 912 | +static av_cold int encode_init_internal(AVCodecContext *avctx) | |
| 913 | 913 | { |
| 914 | 914 | int ret; |
| 915 | 915 | FFV1Context *s = avctx->priv_data; |
| @@ -144,7 +144,7 @@ static int libaribb24_generate_ass_header(AVCodecContext *avctx) · 143 unmodified lines | ||
| 144 | 144 | return 0; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | −static int libaribb24_init(AVCodecContext *avctx) | |
| 147 | +static av_cold int libaribb24_init(AVCodecContext *avctx) | |
| 148 | 148 | { |
| 149 | 149 | Libaribb24Context *b24 = avctx->priv_data; |
| 150 | 150 | void(* arib_dec_init)(arib_decoder_t* decoder) = NULL; |
| @@ -197,7 +197,7 @@ static int libaribb24_init(AVCodecContext *avctx) · 46 unmodified lines | ||
| 197 | 197 | return 0; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | −static int libaribb24_close(AVCodecContext *avctx) | |
| 200 | +static av_cold int libaribb24_close(AVCodecContext *avctx) | |
| 201 | 201 | { |
| 202 | 202 | Libaribb24Context *b24 = avctx->priv_data; |
| 203 | 203 | |
| @@ -939,7 +939,7 @@ static void aribcaption_flush(AVCodecContext *avctx) · 938 unmodified lines | ||
| 939 | 939 | ctx->readorder = 0; |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | −static int aribcaption_close(AVCodecContext *avctx) | |
| 942 | +static av_cold int aribcaption_close(AVCodecContext *avctx) | |
| 943 | 943 | { |
| 944 | 944 | ARIBCaptionContext *ctx = avctx->priv_data; |
| 945 | 945 | |
| @@ -954,7 +954,7 @@ static int aribcaption_close(AVCodecContext *avctx) · 8 unmodified lines | ||
| 954 | 954 | return 0; |
| 955 | 955 | } |
| 956 | 956 | |
| 957 | −static int aribcaption_init(AVCodecContext *avctx) | |
| 957 | +static av_cold int aribcaption_init(AVCodecContext *avctx) | |
| 958 | 958 | { |
| 959 | 959 | ARIBCaptionContext *ctx = avctx->priv_data; |
| 960 | 960 | aribcc_profile_t profile; |
| @@ -35,7 +35,8 @@ typedef struct OggVorbisDecContext { · 34 unmodified lines | ||
| 35 | 35 | |
| 36 | 36 | static int oggvorbis_decode_close(AVCodecContext *avccontext); |
| 37 | 37 | |
| 38 | −static int oggvorbis_decode_init(AVCodecContext *avccontext) { | |
| 38 | +static av_cold int oggvorbis_decode_init(AVCodecContext *avccontext) | |
| 39 | +{ | |
| 39 | 40 | OggVorbisDecContext *context = avccontext->priv_data ; |
| 40 | 41 | uint8_t *p= avccontext->extradata; |
| 41 | 42 | int i, hsizes[3], ret; |
| @@ -198,7 +199,8 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, AVFrame *frame, · 156 unmodified lines | ||
| 198 | 199 | } |
| 199 | 200 | |
| 200 | 201 | |
| 201 | −static int oggvorbis_decode_close(AVCodecContext *avccontext) { | |
| 202 | +static av_cold int oggvorbis_decode_close(AVCodecContext *avccontext) | |
| 203 | +{ | |
| 202 | 204 | OggVorbisDecContext *context = avccontext->priv_data ; |
| 203 | 205 | |
| 204 | 206 | vorbis_block_clear(&context->vb); |
| @@ -213,7 +213,7 @@ static int decode_frame_lscr(AVCodecContext *avctx, AVFrame *rframe, · 212 unmodified lines | ||
| 213 | 213 | return avpkt->size; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | −static int lscr_decode_close(AVCodecContext *avctx) | |
| 216 | +static av_cold int lscr_decode_close(AVCodecContext *avctx) | |
| 217 | 217 | { |
| 218 | 218 | LSCRContext *s = avctx->priv_data; |
| 219 | 219 | |
| @@ -225,7 +225,7 @@ static int lscr_decode_close(AVCodecContext *avctx) · 5 unmodified lines | ||
| 225 | 225 | return 0; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | −static int lscr_decode_init(AVCodecContext *avctx) | |
| 228 | +static av_cold int lscr_decode_init(AVCodecContext *avctx) | |
| 229 | 229 | { |
| 230 | 230 | LSCRContext *s = avctx->priv_data; |
| 231 | 231 | |
| @@ -242,7 +242,7 @@ static int lscr_decode_init(AVCodecContext *avctx) · 10 unmodified lines | ||
| 242 | 242 | return ff_inflate_init(&s->zstream, avctx); |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | −static void lscr_decode_flush(AVCodecContext *avctx) | |
| 245 | +static av_cold void lscr_decode_flush(AVCodecContext *avctx) | |
| 246 | 246 | { |
| 247 | 247 | LSCRContext *s = avctx->priv_data; |
| 248 | 248 | av_frame_unref(s->last_picture); |
| @@ -1226,7 +1226,7 @@ static int mf_close(AVCodecContext *avctx) · 1225 unmodified lines | ||
| 1226 | 1226 | return 0; |
| 1227 | 1227 | } |
| 1228 | 1228 | |
| 1229 | −static int mf_init(AVCodecContext *avctx) | |
| 1229 | +static av_cold int mf_init(AVCodecContext *avctx) | |
| 1230 | 1230 | { |
| 1231 | 1231 | int ret; |
| 1232 | 1232 | if ((ret = mf_load_library(avctx)) == 0) { |
| @@ -319,7 +319,7 @@ static int microdvd_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, · 318 unmodified lines | ||
| 319 | 319 | return avpkt->size; |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | −static int microdvd_init(AVCodecContext *avctx) | |
| 322 | +static av_cold int microdvd_init(AVCodecContext *avctx) | |
| 323 | 323 | { |
| 324 | 324 | int i, sidx; |
| 325 | 325 | AVBPrint font_buf; |
| @@ -443,7 +443,7 @@ static int text_to_ass(AVBPrint *buf, const char *text, const char *text_end, · 442 unmodified lines | ||
| 443 | 443 | return 0; |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | −static int mov_text_init(AVCodecContext *avctx) { | |
| 446 | +static av_cold int mov_text_init(AVCodecContext *avctx) { | |
| 447 | 447 | /* |
| 448 | 448 | * TODO: Handle the default text style. |
| 449 | 449 | * NB: Most players ignore styles completely, with the result that |
| @@ -561,7 +561,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, · 111 unmodified lines | ||
| 561 | 561 | return avpkt->size; |
| 562 | 562 | } |
| 563 | 563 | |
| 564 | −static int mov_text_decode_close(AVCodecContext *avctx) | |
| 564 | +static av_cold int mov_text_decode_close(AVCodecContext *avctx) | |
| 565 | 565 | { |
| 566 | 566 | MovTextContext *m = avctx->priv_data; |
| 567 | 567 | mov_text_cleanup_ftab(m); |
| @@ -569,7 +569,7 @@ static int mov_text_decode_close(AVCodecContext *avctx) · 1 unmodified line | ||
| 569 | 569 | return 0; |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | −static void mov_text_flush(AVCodecContext *avctx) | |
| 572 | +static av_cold void mov_text_flush(AVCodecContext *avctx) | |
| 573 | 573 | { |
| 574 | 574 | MovTextContext *m = avctx->priv_data; |
| 575 | 575 | if (!(avctx->flags2 & AV_CODEC_FLAG2_RO_FLUSH_NOOP)) |
| @@ -779,7 +779,7 @@ static av_cold int decode_close(AVCodecContext *avctx) · 778 unmodified lines | ||
| 779 | 779 | return 0; |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | −static void decode_flush(AVCodecContext *avctx) | |
| 782 | +static av_cold void decode_flush(AVCodecContext *avctx) | |
| 783 | 783 | { |
| 784 | 784 | RASCContext *s = avctx->priv_data; |
| 785 | 785 | |
| @@ -123,7 +123,7 @@ static int rkmpp_write_data(AVCodecContext *avctx, uint8_t *buffer, int size, in · 122 unmodified lines | ||
| 123 | 123 | return ret; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | −static int rkmpp_close_decoder(AVCodecContext *avctx) | |
| 126 | +static av_cold int rkmpp_close_decoder(AVCodecContext *avctx) | |
| 127 | 127 | { |
| 128 | 128 | RKMPPDecodeContext *rk_context = avctx->priv_data; |
| 129 | 129 | av_refstruct_unref(&rk_context->decoder); |
| @@ -149,7 +149,7 @@ static void rkmpp_release_decoder(AVRefStructOpaque unused, void *obj) · 19 unmodified lines | ||
| 149 | 149 | av_buffer_unref(&decoder->device_ref); |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | −static int rkmpp_init_decoder(AVCodecContext *avctx) | |
| 152 | +static av_cold int rkmpp_init_decoder(AVCodecContext *avctx) | |
| 153 | 153 | { |
| 154 | 154 | RKMPPDecodeContext *rk_context = avctx->priv_data; |
| 155 | 155 | RKMPPDecoder *decoder = NULL; |
| @@ -517,7 +517,7 @@ static int rkmpp_receive_frame(AVCodecContext *avctx, AVFrame *frame) · 361 unmodified lines | ||
| 517 | 517 | return rkmpp_retrieve_frame(avctx, frame); |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | −static void rkmpp_flush(AVCodecContext *avctx) | |
| 520 | +static av_cold void rkmpp_flush(AVCodecContext *avctx) | |
| 521 | 521 | { |
| 522 | 522 | RKMPPDecodeContext *rk_context = avctx->priv_data; |
| 523 | 523 | RKMPPDecoder *decoder = rk_context->decoder; |
| @@ -788,7 +788,7 @@ post_skip : · 787 unmodified lines | ||
| 788 | 788 | } |
| 789 | 789 | } |
| 790 | 790 | |
| 791 | −static int rpza_encode_init(AVCodecContext *avctx) | |
| 791 | +static av_cold int rpza_encode_init(AVCodecContext *avctx) | |
| 792 | 792 | { |
| 793 | 793 | RpzaContext *s = avctx->priv_data; |
| 794 | 794 | |
| @@ -847,7 +847,7 @@ static int rpza_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 52 unmodified lines | ||
| 847 | 847 | return 0; |
| 848 | 848 | } |
| 849 | 849 | |
| 850 | −static int rpza_encode_end(AVCodecContext *avctx) | |
| 850 | +static av_cold int rpza_encode_end(AVCodecContext *avctx) | |
| 851 | 851 | { |
| 852 | 852 | RpzaContext *s = (RpzaContext *)avctx->priv_data; |
| 853 | 853 | |
| @@ -321,7 +321,7 @@ static void sbc_synthesize_audio(struct sbc_decoder_state *state, · 320 unmodified lines | ||
| 321 | 321 | } |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | −static int sbc_decode_init(AVCodecContext *avctx) | |
| 324 | +static av_cold int sbc_decode_init(AVCodecContext *avctx) | |
| 325 | 325 | { |
| 326 | 326 | SBCDecContext *sbc = avctx->priv_data; |
| 327 | 327 | int i, ch; |
| @@ -515,7 +515,7 @@ static void smc_encode_stream(SMCContext *s, const AVFrame *frame, · 514 unmodified lines | ||
| 515 | 515 | } |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | −static int smc_encode_init(AVCodecContext *avctx) | |
| 518 | +static av_cold int smc_encode_init(AVCodecContext *avctx) | |
| 519 | 519 | { |
| 520 | 520 | SMCContext *s = avctx->priv_data; |
| 521 | 521 | |
| @@ -580,7 +580,7 @@ static int smc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 58 unmodified lines | ||
| 580 | 580 | return 0; |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | −static int smc_encode_end(AVCodecContext *avctx) | |
| 583 | +static av_cold int smc_encode_end(AVCodecContext *avctx) | |
| 584 | 584 | { |
| 585 | 585 | SMCContext *s = avctx->priv_data; |
| 586 | 586 | |
| @@ -95,7 +95,7 @@ const FFCodec ff_text_decoder = { · 94 unmodified lines | ||
| 95 | 95 | |
| 96 | 96 | #if CONFIG_VPLAYER_DECODER || CONFIG_PJS_DECODER || CONFIG_SUBVIEWER1_DECODER || CONFIG_STL_DECODER |
| 97 | 97 | |
| 98 | −static int linebreak_init(AVCodecContext *avctx) | |
| 98 | +static av_cold int linebreak_init(AVCodecContext *avctx) | |
| 99 | 99 | { |
| 100 | 100 | TextContext *text = avctx->priv_data; |
| 101 | 101 | text->linebreaks = "|"; |
| @@ -74,7 +74,7 @@ static int8_t vaapi_av1_get_bit_depth_idx(AVCodecContext *avctx) · 73 unmodified lines | ||
| 74 | 74 | return bit_depth == 8 ? 0 : bit_depth == 10 ? 1 : 2; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | −static int vaapi_av1_decode_init(AVCodecContext *avctx) | |
| 77 | +static av_cold int vaapi_av1_decode_init(AVCodecContext *avctx) | |
| 78 | 78 | { |
| 79 | 79 | VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; |
| 80 | 80 | |
| @@ -92,7 +92,7 @@ static int vaapi_av1_decode_init(AVCodecContext *avctx) · 11 unmodified lines | ||
| 92 | 92 | return ff_vaapi_decode_init(avctx); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | −static int vaapi_av1_decode_uninit(AVCodecContext *avctx) | |
| 95 | +static av_cold int vaapi_av1_decode_uninit(AVCodecContext *avctx) | |
| 96 | 96 | { |
| 97 | 97 | VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data; |
| 98 | 98 | |
| @@ -139,8 +139,8 @@ int ff_vdpau_common_frame_params(AVCodecContext *avctx, · 138 unmodified lines | ||
| 139 | 139 | return 0; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | −int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, | |
| 143 | − int level) | |
| 142 | +av_cold int ff_vdpau_common_init(AVCodecContext *avctx, | |
| 143 | + VdpDecoderProfile profile, int level) | |
| 144 | 144 | { |
| 145 | 145 | VDPAUHWContext *hwctx = avctx->hwaccel_context; |
| 146 | 146 | VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data; |
| @@ -290,7 +290,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, · 143 unmodified lines | ||
| 290 | 290 | return vdpau_error(status); |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | −int ff_vdpau_common_uninit(AVCodecContext *avctx) | |
| 293 | +av_cold int ff_vdpau_common_uninit(AVCodecContext *avctx) | |
| 294 | 294 | { |
| 295 | 295 | VDPAUContext *vdctx = avctx->internal->hwaccel_priv_data; |
| 296 | 296 | VdpDecoderDestroy *destroy; |
| @@ -330,7 +330,7 @@ static int vdpau_av1_end_frame(AVCodecContext *avctx) · 329 unmodified lines | ||
| 330 | 330 | return 0; |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | −static int vdpau_av1_init(AVCodecContext *avctx) | |
| 333 | +static av_cold int vdpau_av1_init(AVCodecContext *avctx) | |
| 334 | 334 | { |
| 335 | 335 | VdpDecoderProfile profile; |
| 336 | 336 | uint32_t level = avctx->level; |
| @@ -214,7 +214,7 @@ static int vdpau_h264_end_frame(AVCodecContext *avctx) · 213 unmodified lines | ||
| 214 | 214 | return 0; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | −static int vdpau_h264_init(AVCodecContext *avctx) | |
| 217 | +static av_cold int vdpau_h264_init(AVCodecContext *avctx) | |
| 218 | 218 | { |
| 219 | 219 | VdpDecoderProfile profile; |
| 220 | 220 | uint32_t level = avctx->level; |
| @@ -513,7 +513,7 @@ static int vdpau_hevc_parse_rext_profile(AVCodecContext *avctx, VdpDecoderProfil · 512 unmodified lines | ||
| 513 | 513 | } |
| 514 | 514 | |
| 515 | 515 | |
| 516 | −static int vdpau_hevc_init(AVCodecContext *avctx) | |
| 516 | +static av_cold int vdpau_hevc_init(AVCodecContext *avctx) | |
| 517 | 517 | { |
| 518 | 518 | VdpDecoderProfile profile; |
| 519 | 519 | uint32_t level = avctx->level; |
| @@ -100,7 +100,7 @@ static int vdpau_mpeg_decode_slice(AVCodecContext *avctx, · 99 unmodified lines | ||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | #if CONFIG_MPEG1_VDPAU_HWACCEL |
| 103 | −static int vdpau_mpeg1_init(AVCodecContext *avctx) | |
| 103 | +static av_cold int vdpau_mpeg1_init(AVCodecContext *avctx) | |
| 104 | 104 | { |
| 105 | 105 | return ff_vdpau_common_init(avctx, VDP_DECODER_PROFILE_MPEG1, |
| 106 | 106 | VDP_DECODER_LEVEL_MPEG1_NA); |
| @@ -123,7 +123,7 @@ const FFHWAccel ff_mpeg1_vdpau_hwaccel = { · 16 unmodified lines | ||
| 123 | 123 | #endif |
| 124 | 124 | |
| 125 | 125 | #if CONFIG_MPEG2_VDPAU_HWACCEL |
| 126 | −static int vdpau_mpeg2_init(AVCodecContext *avctx) | |
| 126 | +static av_cold int vdpau_mpeg2_init(AVCodecContext *avctx) | |
| 127 | 127 | { |
| 128 | 128 | VdpDecoderProfile profile; |
| 129 | 129 | |
| @@ -90,7 +90,7 @@ static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx, · 89 unmodified lines | ||
| 90 | 90 | return 0; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | −static int vdpau_mpeg4_init(AVCodecContext *avctx) | |
| 93 | +static av_cold int vdpau_mpeg4_init(AVCodecContext *avctx) | |
| 94 | 94 | { |
| 95 | 95 | VdpDecoderProfile profile; |
| 96 | 96 | |
| @@ -116,7 +116,7 @@ static int vdpau_vc1_decode_slice(AVCodecContext *avctx, · 115 unmodified lines | ||
| 116 | 116 | return 0; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | −static int vdpau_vc1_init(AVCodecContext *avctx) | |
| 119 | +static av_cold int vdpau_vc1_init(AVCodecContext *avctx) | |
| 120 | 120 | { |
| 121 | 121 | VdpDecoderProfile profile; |
| 122 | 122 | |
| @@ -197,7 +197,7 @@ static int vdpau_vp9_end_frame(AVCodecContext *avctx) · 196 unmodified lines | ||
| 197 | 197 | return 0; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | −static int vdpau_vp9_init(AVCodecContext *avctx) | |
| 200 | +static av_cold int vdpau_vp9_init(AVCodecContext *avctx) | |
| 201 | 201 | { |
| 202 | 202 | VdpDecoderProfile profile; |
| 203 | 203 | uint32_t level = avctx->level; |