History

avcodec: Mark init and close functions as av_cold

Andreas Rheinhardt committed 1 year ago

Commit 5ad86d51 parent 81ca85a34 files · +54 −52Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t