Skip to content
Browse files

swr: add av_cold to init/free functions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
1 parent dd081f9 commit 31a797eb2846ffa9c7ef2fa0abf81e946a173e6e @michaelni michaelni committed
Showing with 8 additions and 8 deletions.
  1. +3 −3 libswresample/rematrix.c
  2. +3 −3 libswresample/swresample.c
  3. +2 −2 libswresample/x86/swresample_x86.c
View
6 libswresample/rematrix.c
@@ -133,7 +133,7 @@ static int sane_layout(int64_t layout){
return 1;
}
-static int auto_matrix(SwrContext *s)
+av_cold static int auto_matrix(SwrContext *s)
{
int i, j, out_i;
double matrix[64][64]={{0}};
@@ -349,7 +349,7 @@ static int auto_matrix(SwrContext *s)
return 0;
}
-int swri_rematrix_init(SwrContext *s){
+av_cold int swri_rematrix_init(SwrContext *s){
int i, j;
int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout);
int nb_out = av_get_channel_layout_nb_channels(s->out_ch_layout);
@@ -409,7 +409,7 @@ int swri_rematrix_init(SwrContext *s){
return 0;
}
-void swri_rematrix_free(SwrContext *s){
+av_cold void swri_rematrix_free(SwrContext *s){
av_freep(&s->native_matrix);
av_freep(&s->native_one);
av_freep(&s->native_simd_matrix);
View
6 libswresample/swresample.c
@@ -144,7 +144,7 @@ const AVClass *swr_get_class(void)
return &av_class;
}
-struct SwrContext *swr_alloc(void){
+av_cold struct SwrContext *swr_alloc(void){
SwrContext *s= av_mallocz(sizeof(SwrContext));
if(s){
s->av_class= &av_class;
@@ -187,7 +187,7 @@ static void free_temp(AudioData *a){
memset(a, 0, sizeof(*a));
}
-void swr_free(SwrContext **ss){
+av_cold void swr_free(SwrContext **ss){
SwrContext *s= *ss;
if(s){
free_temp(&s->postin);
@@ -205,7 +205,7 @@ void swr_free(SwrContext **ss){
av_freep(ss);
}
-int swr_init(struct SwrContext *s){
+av_cold int swr_init(struct SwrContext *s){
s->in_buffer_index= 0;
s->in_buffer_count= 0;
s->resample_in_constraint= 0;
View
4 libswresample/x86/swresample_x86.c
@@ -30,7 +30,7 @@ PROTO4(_pack_2ch)
PROTO4(_pack_6ch)
PROTO4(_unpack_2ch)
-void swri_audio_convert_init_x86(struct AudioConvert *ac,
+av_cold void swri_audio_convert_init_x86(struct AudioConvert *ac,
enum AVSampleFormat out_fmt,
enum AVSampleFormat in_fmt,
int channels){
@@ -149,7 +149,7 @@ D(int16, mmx)
D(int16, sse2)
-void swri_rematrix_init_x86(struct SwrContext *s){
+av_cold void swri_rematrix_init_x86(struct SwrContext *s){
int mm_flags = av_get_cpu_flags();
int nb_in = av_get_channel_layout_nb_channels(s->in_ch_layout);
int nb_out = av_get_channel_layout_nb_channels(s->out_ch_layout);

0 comments on commit 31a797e

Please sign in to comment.
Something went wrong with that request. Please try again.