Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1b - Decimal:
27
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| static void fft8(FFTComplex *z) | |
| { | |
| FFTSample r1 = z[0].re - z[4].re; | |
| FFTSample r2 = z[0].im - z[4].im; | |
| FFTSample r3 = z[1].re - z[5].re; | |
| FFTSample r4 = z[1].im - z[5].im; | |
| FFTSample r5 = z[2].re - z[6].re; | |
| FFTSample r6 = z[2].im - z[6].im; | |
| FFTSample r7 = z[3].re - z[7].re; |
| static void fft4(void *s, FFTComplex *z, FFTComplex *temp) | |
| { | |
| FFTSample r1 = z[0].re - z[2].re; | |
| FFTSample r2 = z[0].im - z[2].im; | |
| FFTSample r3 = z[1].re - z[3].re; | |
| FFTSample r4 = z[1].im - z[3].im; | |
| /* r5-r8 second transform */ | |
| FFTSample t1 = z[0].re + z[2].re; | |
| FFTSample t2 = z[0].im + z[2].im; |
| // from https://gist.github.com/cyanreg/665b9c79cbe51df9296a969257f2a16c | |
| static void fft4(FFTComplex *z) | |
| { | |
| FFTSample r1 = z[0].re - z[4].re; | |
| FFTSample r2 = z[0].im - z[4].im; | |
| FFTSample r3 = z[1].re - z[5].re; | |
| FFTSample r4 = z[1].im - z[5].im; | |
| /* r5-r8 second transform */ | |
| FFTSample t1 = z[0].re + z[4].re; |
| static void fft8(void *s, FFTComplex *z, FFTComplex *temp) | |
| { | |
| FFTSample r1 = z[0].re - z[4].re; | |
| FFTSample r2 = z[0].im - z[4].im; | |
| FFTSample r3 = z[1].re - z[5].re; | |
| FFTSample r4 = z[1].im - z[5].im; | |
| FFTSample j1 = z[2].re - z[6].re; | |
| FFTSample j2 = z[2].im - z[6].im; | |
| FFTSample j3 = z[3].re - z[7].re; |
| #define BF(x, y, a, b) \ | |
| do { \ | |
| x = (a) - (b); \ | |
| y = (a) + (b); \ | |
| } while (0) | |
| #define BUTTERFLIES_MIX(a0,a1,a2,a3, P1, P2, P5, P6) \ | |
| do { \ | |
| r0=a0.re; \ | |
| i0=a0.im; \ |
| void forward_qmf(float *out_low, float *out_high, float *delay, const float *in, | |
| int samples, int delay_samples) | |
| { | |
| memcpy(delay, delay + samples, delay_samples * sizeof(float)); | |
| memcpy(delay + delay_samples, in, samples * sizeof(float)); | |
| for (int i = 0; i < samples; i += 2) { | |
| float low = 0.0f, high = 0.0f; | |
| /* Can be done via float_dsp */ |
| ;****************************************************************************** | |
| ;* Copyright (c) Lynne | |
| ;* | |
| ;* This file is part of FFmpeg. | |
| ;* | |
| ;* FFmpeg is free software; you can redistribute it and/or | |
| ;* modify it under the terms of the GNU Lesser General Public | |
| ;* License as published by the Free Software Foundation; either | |
| ;* version 2.1 of the License, or (at your option) any later version. | |
| ;* |
| /* | |
| * This file is part of FFmpeg. | |
| * | |
| * FFmpeg is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Lesser General Public | |
| * License as published by the Free Software Foundation; either | |
| * version 2.1 of the License, or (at your option) any later version. | |
| * | |
| * FFmpeg is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |