MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / shift

Function shift

libswresample/tests/swresample.c:76–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static void shift(uint8_t *a[], int index, int ch_count, enum AVSampleFormat f){
77 int ch;
78
79 if(av_sample_fmt_is_planar(f)){
80 f= av_get_alt_sample_fmt(f, 0);
81 for(ch= 0; ch<ch_count; ch++)
82 a[ch] += index*av_get_bytes_per_sample(f);
83 }else{
84 a[0] += index*ch_count*av_get_bytes_per_sample(f);
85 }
86}
87
88static const enum AVSampleFormat formats[] = {
89 AV_SAMPLE_FMT_S16,

Callers 1

mainFunction · 0.70

Calls 3

av_sample_fmt_is_planarFunction · 0.85
av_get_alt_sample_fmtFunction · 0.85
av_get_bytes_per_sampleFunction · 0.85

Tested by

no test coverage detected