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

Function permute

libavcodec/tests/dct.c:158–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158static void permute(int16_t dst[64], const int16_t src[64],
159 enum idct_permutation_type perm_type)
160{
161 int i;
162
163#if ARCH_X86
164 if (permute_x86(dst, src, perm_type))
165 return;
166#endif
167
168 switch (perm_type) {
169 case FF_IDCT_PERM_LIBMPEG2:
170 for (i = 0; i < 64; i++)
171 dst[(i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2)] = src[i];
172 break;
173 case FF_IDCT_PERM_PARTTRANS:
174 for (i = 0; i < 64; i++)
175 dst[(i & 0x24) | ((i & 3) << 3) | ((i >> 3) & 3)] = src[i];
176 break;
177 case FF_IDCT_PERM_TRANSPOSE:
178 for (i = 0; i < 64; i++)
179 dst[(i>>3) | ((i<<3)&0x38)] = src[i];
180 break;
181 default:
182 for (i = 0; i < 64; i++)
183 dst[i] = src[i];
184 break;
185 }
186}
187
188static int dct_error(const struct algo *dct, int test, int is_idct, int speed, const int bits)
189{

Callers 1

dct_errorFunction · 0.85

Calls 1

permute_x86Function · 0.85

Tested by

no test coverage detected