History

swresample/rematrix: Constify

Andreas Rheinhardt committed 1 year ago

Commit 2db60f91 parent 589f1e53 files · +11 −8Browse files

Unified · Split

3 files
  1. libswresample/rematrix.c +1 −1
  2. libswresample/rematrix_template.c +7 −4
  3. libswresample/swresample_internal.h +3 −3
libswresample/rematrix.c+1−1
@@ -581,7 +581,7 @@ int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mus · 580 unmodified lines
581 int off = 0;581 int off = 0;
582 582
583 if(s->mix_any_f) {583 if(s->mix_any_f) {
584 s->mix_any_f(out->ch, (const uint8_t **)in->ch, s->native_matrix, len);584 s->mix_any_f(out->ch, (const uint8_t *const *)in->ch, s->native_matrix, len);
585 return 0;585 return 0;
586 }586 }
587 587
libswresample/rematrix_template.c+7−4
@@ -50,7 +50,7 @@ · 49 unmodified lines
50#endif50#endif
51 51
52static void RENAME(sum2)(void *out_, const void *in1_, const void *in2_,52static void RENAME(sum2)(void *out_, const void *in1_, const void *in2_,
53 void *coeffp_, integer index1, integer index2, integer len)53 const void *coeffp_, integer index1, integer index2, integer len)
54{54{
55 const SAMPLE *in1 = in1_, *in2 = in2_;55 const SAMPLE *in1 = in1_, *in2 = in2_;
56 const COEFF *coeffp = coeffp_;56 const COEFF *coeffp = coeffp_;
@@ -63,7 +63,8 @@ static void RENAME(sum2)(void *out_, const void *in1_, const void *in2_, · 6 unmodified lines
63 out[i] = R(coeff1*in1[i] + coeff2*in2[i]);63 out[i] = R(coeff1*in1[i] + coeff2*in2[i]);
64}64}
65 65
66static void RENAME(copy)(void *out_, const void *in_, void *coeffp_, integer index, integer len)66static void RENAME(copy)(void *out_, const void *in_, const void *coeffp_,
67 integer index, integer len)
67{68{
68 const COEFF *coeffp = coeffp_;69 const COEFF *coeffp = coeffp_;
69 const SAMPLE *in = in_;70 const SAMPLE *in = in_;
@@ -74,7 +75,8 @@ static void RENAME(copy)(void *out_, const void *in_, void *coeffp_, integer ind · 4 unmodified lines
74 out[i] = R(coeff*in[i]);75 out[i] = R(coeff*in[i]);
75}76}
76 77
77static void RENAME(mix6to2)(uint8_t **out_, const uint8_t **in_, void *coeffp_, integer len)78static void RENAME(mix6to2)(uint8_t *const *out_, const uint8_t *const *in_,
79 const void *coeffp_, integer len)
78{80{
79 const SAMPLE *const *const in = (const SAMPLE *const *)in_;81 const SAMPLE *const *const in = (const SAMPLE *const *)in_;
80 SAMPLE *const *const out = (SAMPLE *const*)out_;82 SAMPLE *const *const out = (SAMPLE *const*)out_;
@@ -88,7 +90,8 @@ static void RENAME(mix6to2)(uint8_t **out_, const uint8_t **in_, void *coeffp_, · 7 unmodified lines
88 }90 }
89}91}
90 92
91static void RENAME(mix8to2)(uint8_t **out_, const uint8_t **in_, void *coeffp_, integer len)93static void RENAME(mix8to2)(uint8_t *const *out_, const uint8_t *const *in_,
94 const void *coeffp_, integer len)
92{95{
93 const SAMPLE *const *const in = (const SAMPLE *const *)in_;96 const SAMPLE *const *const in = (const SAMPLE *const *)in_;
94 SAMPLE *const *const out = (SAMPLE *const*)out_;97 SAMPLE *const *const out = (SAMPLE *const*)out_;
libswresample/swresample_internal.h+3−3
@@ -37,10 +37,10 @@ typedef int64_t integer; · 36 unmodified lines
37typedef int integer;37typedef int integer;
38#endif38#endif
39 39
40typedef void (mix_1_1_func_type)(void *out, const void *in, void *coeffp, integer index, integer len);40typedef void (mix_1_1_func_type)(void *out, const void *in, const void *coeffp, integer index, integer len);
41typedef void (mix_2_1_func_type)(void *out, const void *in1, const void *in2, void *coeffp, integer index1, integer index2, integer len);41typedef void (mix_2_1_func_type)(void *out, const void *in1, const void *in2, const void *coeffp, integer index1, integer index2, integer len);
42 42
43typedef void (mix_any_func_type)(uint8_t **out, const uint8_t **in1, void *coeffp, integer len);43typedef void (mix_any_func_type)(uint8_t *const *out, const uint8_t *const *in1, const void *coeffp, integer len);
44 44
45typedef struct AudioData{45typedef struct AudioData{
46 uint8_t *ch[SWR_CH_MAX]; ///< samples buffer per channel46 uint8_t *ch[SWR_CH_MAX]; ///< samples buffer per channel

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