21 #if defined(CONFIG_RESAMPLE_DBL) 22 #define SET_TYPE(func) func ## _dbl 26 #define OUT(d, v) d = v 27 #define DBL_TO_FELEM(d, v) d = v 28 #elif defined(CONFIG_RESAMPLE_FLT) 29 #define SET_TYPE(func) func ## _flt 33 #define OUT(d, v) d = v 34 #define DBL_TO_FELEM(d, v) d = v 35 #elif defined(CONFIG_RESAMPLE_S32) 36 #define SET_TYPE(func) func ## _s32 38 #define FELEM2 int64_t 39 #define FELEML int64_t 40 #define OUT(d, v) d = av_clipl_int32((v + (1 << 29)) >> 30) 41 #define DBL_TO_FELEM(d, v) d = av_clipl_int32(llrint(v * (1 << 30))); 43 #define SET_TYPE(func) func ## _s16 45 #define FELEM2 int32_t 46 #define FELEML int64_t 47 #define OUT(d, v) d = av_clip_int16((v + (1 << 14)) >> 15) 48 #define DBL_TO_FELEM(d, v) d = av_clip_int16(lrint(v * (1 << 15))) 52 void *dst0,
int dst_index,
const void *src0,
53 int src_size,
int index,
int frac)
59 dst[dst_index] = src[
index];
62 int sample_index =
index >>
c->phase_shift;
65 c->filter_length * (
index &
c->phase_mask);
67 if (sample_index < 0) {
68 for (i = 0; i <
c->filter_length; i++)
69 val += src[
FFABS(sample_index + i) % src_size] *
71 }
else if (
c->linear) {
73 for (i = 0; i <
c->filter_length; i++) {
74 val += src[abs(sample_index + i)] * (
FELEM2)filter[i];
75 v2 += src[abs(sample_index + i)] * (
FELEM2)filter[i +
c->filter_length];
77 val += (v2 -
val) * (
FELEML)frac /
c->src_incr;
79 for (i = 0; i <
c->filter_length; i++)
80 val += src[sample_index + i] * (
FELEM2)filter[
i];
83 OUT(dst[dst_index], val);
92 for (i = 0; i < tap_count; i++) {
#define DBL_TO_FELEM(d, v)
static void SET_TYPE() set_filter(void *filter0, double *tab, int phase, int tap_count)
static void SET_TYPE() resample_one(ResampleContext *c, int no_filter, void *dst0, int dst_index, const void *src0, int src_size, int index, int frac)
the mask is usually to keep the same permissions Filters should remove permissions on reference they give to output whenever necessary It can be automatically done by setting the rej_perms field on the output pad Here are a few guidelines corresponding to common then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
synthesis window for stochastic i
else dst[i][x+y *dst_stride[i]]
static const struct twinvq_data tab