History

Merge remote branch 'qatar/master'

* qatar/master: (23 commits) ac3enc: correct the flipped sign in the ac3_fixed encoder Eliminate pointless '#if 1' statements without matching '#else'. Add AVX FFT implementation. Increase alignment of av_malloc() as needed by AVX ASM. Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX. mjpeg: Detect overreads in mjpeg_decode_scan() and error out. documentation: extend documentation for ffmpeg -aspect option APIChanges: update commit hashes for recent additions. lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums aac: add headers needed for log2f() lavc: remove FF_API_MB_Q cruft lavc: remove FF_API_RATE_EMU cruft lavc: remove FF_API_HURRY_UP cruft pad: make the filter parametric vsrc_movie: add key_frame and pict_type. vsrc_movie: fix leak in request_frame() lavfi: add key_frame and pict_type to AVFilterBufferRefVideo. vsrc_buffer: add sample_aspect_ratio fields to arguments. lavfi: add fieldorder filter scale: make the filter parametric ... Conflicts: Changelog doc/filters.texi ffmpeg.c libavcodec/ac3dec.h libavcodec/dsputil.c libavfilter/avfilter.h libavfilter/vf_scale.c libavfilter/vf_yadif.c libavfilter/vsrc_buffer.c

Michael Niedermayer committed 15 years ago

Commit d7e5aeb2 parents 93c28a5 79ee89764 files · +804 −421Browse files

Unified · Split

64 files
  1. Changelog +1 −1
  2. doc/APIchanges +11 −0
  3. ffmpeg.c +4 −0
  4. ffserver.c +0 −2
  5. libavcodec/aac.h +5 −5
  6. libavcodec/aaccoder.c +1 −0
  7. libavcodec/aacenc.h +1 −1
  8. libavcodec/aacsbr.c +1 −0
  9. libavcodec/ac3dec.h +7 −7
  10. libavcodec/ac3enc.c +1 −1
  11. libavcodec/ac3enc_fixed.c +1 −1
  12. libavcodec/atrac1.c +10 −10
  13. libavcodec/atrac3.c +3 −3
  14. libavcodec/avcodec.h +15 −45
  15. libavcodec/binkaudio.c +1 −1
  16. libavcodec/cook.c +1 −1
  17. libavcodec/dca.c +5 −5
  18. libavcodec/dct-test.c +1 −4
  19. libavcodec/error_resilience.c +5 −12
  20. libavcodec/fft.c +48 −5
  21. libavcodec/fft.h +2 −1
  22. libavcodec/h261dec.c +0 −4
  23. libavcodec/h263dec.c +0 −8
  24. libavcodec/h264.c +2 −16
  25. libavcodec/h264.h +0 −2
  26. libavcodec/imc.c +1 −1
  27. libavcodec/motion_est_template.c +0 −2
  28. libavcodec/mpeg12.c +0 −8
  29. libavcodec/mpegvideo.c +0 −6
  30. libavcodec/mpegvideo.h +0 −5
  31. libavcodec/msmpeg4.c +3 −4
  32. libavcodec/nellymoserdec.c +2 −2
  33. libavcodec/nellymoserenc.c +3 −3
  34. libavcodec/options.c +0 −10
  35. libavcodec/pthread.c +0 −3
  36. libavcodec/qdm2.c +1 −1
  37. libavcodec/rv34.c +0 −9
  38. libavcodec/sh4/qpel.c +0 −2
  39. libavcodec/snow.c +0 −2
  40. libavcodec/svq1dec.c +0 −3
  41. libavcodec/svq3.c +0 −8
  42. libavcodec/utils.c +3 −10
  43. libavcodec/vc1dec.c +0 −10
  44. libavcodec/version.h +4 −10
  45. libavcodec/wma.h +4 −4
  46. libavcodec/wmaprodec.c +2 −2
  47. libavcodec/wmavoice.c +3 −3
  48. libavcodec/x86/fft.c +8 −1
  49. libavcodec/x86/fft.h +2 −0
  50. libavcodec/x86/fft_mmx.asm +334 −150
  51. libavcodec/x86/fft_sse.c +7 −1
  52. libavcodec/x86/x86inc.asm +248 −1
  53. libavfilter/avfilter.h +3 −3
  54. libavfilter/vf_scale.c +2 −2
  55. libavfilter/vf_yadif.c +1 −2
  56. libavfilter/vsrc_buffer.c +1 −1
  57. libavformat/nutenc.c +0 −2
  58. libavutil/avutil.h +20 −1
  59. libavutil/mem.c +7 −9
  60. libavutil/pca.c +1 −2
  61. libavutil/utils.c +14 −0
  62. tests/ref/acodec/ac3_fixed +1 −1
  63. tests/ref/lavf/rm +1 −1
  64. tests/ref/seek/ac3_rm +2 −1
Changelog+1−1
@@ -10,7 +10,7 @@ version <next>: · 9 unmodified lines
1010 - libxvid aspect pickiness fixed
1111 - Frame multithreaded decoding
1212 - Lots of deprecated API cruft removed
13−
13+- fft and imdct optimizations for AVX (Sandy Bridge) processors
1414
1515 version 0.7_beta1:
1616
doc/APIchanges+11−0
@@ -13,6 +13,17 @@ libavutil: 2011-04-18 · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2011-04-XX - bebe72f - lavu 51.1.0 - avutil.h
17+ Add AVPictureType enum and av_get_picture_type_char(), deprecate
18+ FF_*_TYPE defines and av_get_pict_type_char() defined in
19+ libavcodec/avcodec.h.
20+
21+2011-04-xx - 10d3940 - lavfi 2.3.0 - avfilter.h
22+ Add pict_type and key_frame fields to AVFilterBufferRefVideo.
23+
24+2011-04-xx - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
25+ Add sample_aspect_ratio fields to vsrc_buffer arguments
26+
1627 2011-04-21 - 94f7451 - lavc 53.1.0 - avcodec.h
1728 Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading.
1829
ffmpeg.c+4−0
@@ -2908,6 +2908,10 @@ static void opt_frame_aspect_ratio(const char *arg) · 2907 unmodified lines
29082908 ffmpeg_exit(1);
29092909 }
29102910 frame_aspect_ratio = ar;
2911+
2912+ x = vfilters ? strlen(vfilters) : 0;
2913+ vfilters = av_realloc(vfilters, x+100);
2914+ snprintf(vfilters+x, x+100, "%csetdar=%f\n", x?',':' ', ar);
29112915 }
29122916
29132917 static int opt_metadata(const char *opt, const char *arg)
ffserver.c+0−2
@@ -2185,10 +2185,8 @@ static int open_input_stream(HTTPContext *c, const char *info) · 2184 unmodified lines
21852185 }
21862186 }
21872187
2188−#if 1
21892188 if (c->fmt_in->iformat->read_seek)
21902189 av_seek_frame(c->fmt_in, -1, stream_pos, 0);
2191−#endif
21922190 /* set the start time (needed for maxtime and RTP packet timing) */
21932191 c->start_time = cur_time;
21942192 c->first_pts = AV_NOPTS_VALUE;
libavcodec/aac.h+5−5
@@ -223,9 +223,9 @@ typedef struct { · 222 unmodified lines
223223 float sf[120]; ///< scalefactors
224224 int sf_idx[128]; ///< scalefactor indices (used by encoder)
225225 uint8_t zeroes[128]; ///< band is not coded (used by encoder)
226− DECLARE_ALIGNED(16, float, coeffs)[1024]; ///< coefficients for IMDCT
227− DECLARE_ALIGNED(16, float, saved)[1024]; ///< overlap
228− DECLARE_ALIGNED(16, float, ret)[2048]; ///< PCM output
226+ DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT
227+ DECLARE_ALIGNED(32, float, saved)[1024]; ///< overlap
228+ DECLARE_ALIGNED(32, float, ret)[2048]; ///< PCM output
229229 DECLARE_ALIGNED(16, int16_t, ltp_state)[3072]; ///< time signal for LTP
230230 PredictorState predictor_state[MAX_PREDICTORS];
231231 } SingleChannelElement;
@@ -272,7 +272,7 @@ typedef struct { · 40 unmodified lines
272272 * @defgroup temporary aligned temporary buffers (We do not want to have these on the stack.)
273273 * @{
274274 */
275− DECLARE_ALIGNED(16, float, buf_mdct)[1024];
275+ DECLARE_ALIGNED(32, float, buf_mdct)[1024];
276276 /** @} */
277277
278278 /**
@@ -296,7 +296,7 @@ typedef struct { · 17 unmodified lines
296296 int sf_offset; ///< offset into pow2sf_tab as appropriate for dsp.float_to_int16
297297 /** @} */
298298
299− DECLARE_ALIGNED(16, float, temp)[128];
299+ DECLARE_ALIGNED(32, float, temp)[128];
300300
301301 enum OCStatus output_configured;
302302 } AACContext;
libavcodec/aaccoder.c+1−0
@@ -37,6 +37,7 @@ · 36 unmodified lines
3737 #include "aac.h"
3838 #include "aacenc.h"
3939 #include "aactab.h"
40+#include "libavutil/libm.h"
4041
4142 /** bits needed to code codebook run value for long windows */
4243 static const uint8_t run_value_bits_long[64] = {
libavcodec/aacenc.h+1−1
@@ -64,7 +64,7 @@ typedef struct AACEncContext { · 63 unmodified lines
6464 int last_frame;
6565 float lambda;
6666 DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients
67− DECLARE_ALIGNED(16, float, scoefs)[1024]; ///< scaled coefficients
67+ DECLARE_ALIGNED(32, float, scoefs)[1024]; ///< scaled coefficients
6868 } AACEncContext;
6969
7070 #endif /* AVCODEC_AACENC_H */
libavcodec/aacsbr.c+1−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include "aacsbrdata.h"
3333 #include "fft.h"
3434 #include "aacps.h"
35+#include "libavutil/libm.h"
3536
3637 #include <stdint.h>
3738 #include <float.h>
libavcodec/ac3dec.h+7−7
@@ -201,13 +201,13 @@ typedef struct { · 200 unmodified lines
201201 ///@}
202202
203203 ///@defgroup arrays aligned arrays
204− DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< fixed-point transform coefficients
205− DECLARE_ALIGNED(16, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients
206− DECLARE_ALIGNED(16, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block
207− DECLARE_ALIGNED(16, float, window)[AC3_BLOCK_SIZE]; ///< window coefficients
208− DECLARE_ALIGNED(16, float, tmp_output)[AC3_BLOCK_SIZE]; ///< temporary storage for output before windowing
209− DECLARE_ALIGNED(16, float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< output after imdct transform and windowing
210− DECLARE_ALIGNED(16, uint8_t, input_buffer)[AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; ///< temp buffer to prevent overread
204+ DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///> fixed-point transform coefficients
205+ DECLARE_ALIGNED(32, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients
206+ DECLARE_ALIGNED(32, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block
207+ DECLARE_ALIGNED(32, float, window)[AC3_BLOCK_SIZE]; ///< window coefficients
208+ DECLARE_ALIGNED(32, float, tmp_output)[AC3_BLOCK_SIZE]; ///< temporary storage for output before windowing
209+ DECLARE_ALIGNED(32, float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< output after imdct transform and windowing
210+ DECLARE_ALIGNED(32, uint8_t, input_buffer)[AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE]; ///< temp buffer to prevent overread
211211 ///@}
212212 } AC3DecodeContext;
213213
libavcodec/ac3enc.c+1−1
@@ -171,7 +171,7 @@ typedef struct AC3EncodeContext { · 170 unmodified lines
171171
172172 uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< exponent strategies
173173
174− DECLARE_ALIGNED(16, SampleType, windowed_samples)[AC3_WINDOW_SIZE];
174+ DECLARE_ALIGNED(32, SampleType, windowed_samples)[AC3_WINDOW_SIZE];
175175 } AC3EncodeContext;
176176
177177 typedef struct AC3Mant {
libavcodec/ac3enc_fixed.c+1−1
@@ -47,7 +47,7 @@ static av_cold void mdct_end(AC3MDCTContext *mdct) · 46 unmodified lines
4747 static av_cold int mdct_init(AVCodecContext *avctx, AC3MDCTContext *mdct,
4848 int nbits)
4949 {
50− int ret = ff_mdct_init(&mdct->fft, nbits, 0, 1.0);
50+ int ret = ff_mdct_init(&mdct->fft, nbits, 0, -1.0);
5151 mdct->window = ff_ac3_window;
5252 return ret;
5353 }
libavcodec/atrac1.c+10−10
@@ -60,11 +60,11 @@ typedef struct { · 59 unmodified lines
6060 int log2_block_count[AT1_QMF_BANDS]; ///< log2 number of blocks in a band
6161 int num_bfus; ///< number of Block Floating Units
6262 float* spectrum[2];
63− DECLARE_ALIGNED(16, float, spec1)[AT1_SU_SAMPLES]; ///< mdct buffer
64− DECLARE_ALIGNED(16, float, spec2)[AT1_SU_SAMPLES]; ///< mdct buffer
65− DECLARE_ALIGNED(16, float, fst_qmf_delay)[46]; ///< delay line for the 1st stacked QMF filter
66− DECLARE_ALIGNED(16, float, snd_qmf_delay)[46]; ///< delay line for the 2nd stacked QMF filter
67− DECLARE_ALIGNED(16, float, last_qmf_delay)[256+23]; ///< delay line for the last stacked QMF filter
63+ DECLARE_ALIGNED(32, float, spec1)[AT1_SU_SAMPLES]; ///< mdct buffer
64+ DECLARE_ALIGNED(32, float, spec2)[AT1_SU_SAMPLES]; ///< mdct buffer
65+ DECLARE_ALIGNED(32, float, fst_qmf_delay)[46]; ///< delay line for the 1st stacked QMF filter
66+ DECLARE_ALIGNED(32, float, snd_qmf_delay)[46]; ///< delay line for the 2nd stacked QMF filter
67+ DECLARE_ALIGNED(32, float, last_qmf_delay)[256+23]; ///< delay line for the last stacked QMF filter
6868 } AT1SUCtx;
6969
7070 /**
@@ -72,13 +72,13 @@ typedef struct { · 1 unmodified line
7272 */
7373 typedef struct {
7474 AT1SUCtx SUs[AT1_MAX_CHANNELS]; ///< channel sound unit
75− DECLARE_ALIGNED(16, float, spec)[AT1_SU_SAMPLES]; ///< the mdct spectrum buffer
75+ DECLARE_ALIGNED(32, float, spec)[AT1_SU_SAMPLES]; ///< the mdct spectrum buffer
7676
77− DECLARE_ALIGNED(16, float, low)[256];
78− DECLARE_ALIGNED(16, float, mid)[256];
79− DECLARE_ALIGNED(16, float, high)[512];
77+ DECLARE_ALIGNED(32, float, low)[256];
78+ DECLARE_ALIGNED(32, float, mid)[256];
79+ DECLARE_ALIGNED(32, float, high)[512];
8080 float* bands[3];
81− DECLARE_ALIGNED(16, float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES];
81+ DECLARE_ALIGNED(32, float, out_samples)[AT1_MAX_CHANNELS][AT1_SU_SAMPLES];
8282 FFTContext mdct_ctx[3];
8383 int channels;
8484 DSPContext dsp;
libavcodec/atrac3.c+3−3
@@ -74,8 +74,8 @@ typedef struct { · 73 unmodified lines
7474 int gcBlkSwitch;
7575 gain_block gainBlock[2];
7676
77− DECLARE_ALIGNED(16, float, spectrum)[1024];
78− DECLARE_ALIGNED(16, float, IMDCT_buf)[1024];
77+ DECLARE_ALIGNED(32, float, spectrum)[1024];
78+ DECLARE_ALIGNED(32, float, IMDCT_buf)[1024];
7979
8080 float delayBuf1[46]; ///<qmf delay buffers
8181 float delayBuf2[46];
@@ -122,7 +122,7 @@ typedef struct { · 40 unmodified lines
122122 FFTContext mdct_ctx;
123123 } ATRAC3Context;
124124
125−static DECLARE_ALIGNED(16, float,mdct_window)[512];
125+static DECLARE_ALIGNED(32, float, mdct_window)[512];
126126 static VLC spectral_coeff_tab[7];
127127 static float gain_tab1[16];
128128 static float gain_tab2[31];
libavcodec/avcodec.h+15−45
@@ -766,7 +766,7 @@ typedef struct AVPanScan{ · 765 unmodified lines
766766 * - encoding: Set by libavcodec. for coded_picture (and set by user for input).\
767767 * - decoding: Set by libavcodec.\
768768 */\
769− int pict_type;\
769+ enum AVPictureType pict_type;\
770770 \
771771 /**\
772772 * presentation timestamp in time_base units (time when frame should be shown to user)\
@@ -1016,14 +1016,16 @@ typedef struct AVPanScan{ · 243 unmodified lines
10161016 #define FF_BUFFER_TYPE_SHARED 4 ///< Buffer from somewhere else; don't deallocate image (data/base), all other tables are not shared.
10171017 #define FF_BUFFER_TYPE_COPY 8 ///< Just a (modified) copy of some other buffer, don't deallocate anything.
10181018
1019−
1020−#define FF_I_TYPE 1 ///< Intra
1021−#define FF_P_TYPE 2 ///< Predicted
1022−#define FF_B_TYPE 3 ///< Bi-dir predicted
1023−#define FF_S_TYPE 4 ///< S(GMC)-VOP MPEG4
1024−#define FF_SI_TYPE 5 ///< Switching Intra
1025−#define FF_SP_TYPE 6 ///< Switching Predicted
1026−#define FF_BI_TYPE 7
1019+#if FF_API_OLD_FF_PICT_TYPES
1020+/* DEPRECATED, directly use the AV_PICTURE_TYPE_* enum values */
1021+#define FF_I_TYPE AV_PICTURE_TYPE_I ///< Intra
1022+#define FF_P_TYPE AV_PICTURE_TYPE_P ///< Predicted
1023+#define FF_B_TYPE AV_PICTURE_TYPE_B ///< Bi-dir predicted
1024+#define FF_S_TYPE AV_PICTURE_TYPE_S ///< S(GMC)-VOP MPEG4
1025+#define FF_SI_TYPE AV_PICTURE_TYPE_SI ///< Switching Intra
1026+#define FF_SP_TYPE AV_PICTURE_TYPE_SP ///< Switching Predicted
1027+#define FF_BI_TYPE AV_PICTURE_TYPE_BI
1028+#endif
10271029
10281030 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
10291031 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
@@ -1215,16 +1217,6 @@ typedef struct AVCodecContext { · 185 unmodified lines
12151217 */
12161218 enum PixelFormat pix_fmt;
12171219
1218−#if FF_API_RATE_EMU
1219− /**
1220− * Frame rate emulation. If not zero, the lower layer (i.e. format handler)
1221− * has to read frames at native frame rate.
1222− * - encoding: Set by user.
1223− * - decoding: unused
1224− */
1225− attribute_deprecated int rate_emu;
1226−#endif
1227−
12281220 /**
12291221 * If non NULL, 'draw_horiz_band' is called by the libavcodec
12301222 * decoder to draw a horizontal band. It improves cache usage. Not
@@ -1326,16 +1318,6 @@ typedef struct AVCodecContext { · 95 unmodified lines
13261318
13271319 int b_frame_strategy;
13281320
1329−#if FF_API_HURRY_UP
1330− /**
1331− * hurry up amount
1332− * - encoding: unused
1333− * - decoding: Set by user. 1-> Skip B-frames, 2-> Skip IDCT/dequant too, 5-> Skip everything except header
1334− * @deprecated Deprecated in favor of skip_idct and skip_frame.
1335− */
1336− attribute_deprecated int hurry_up;
1337−#endif
1338−
13391321 struct AVCodec *codec;
13401322
13411323 void *priv_data;
@@ -1800,22 +1782,6 @@ typedef struct AVCodecContext { · 458 unmodified lines
18001782 */
18011783 uint64_t error[4];
18021784
1803−#if FF_API_MB_Q
1804− /**
1805− * minimum MB quantizer
1806− * - encoding: unused
1807− * - decoding: unused
1808− */
1809− attribute_deprecated int mb_qmin;
1810−
1811− /**
1812− * maximum MB quantizer
1813− * - encoding: unused
1814− * - decoding: unused
1815− */
1816− attribute_deprecated int mb_qmax;
1817−#endif
1818−
18191785 /**
18201786 * motion estimation comparison function
18211787 * - encoding: Set by user.
@@ -3866,13 +3832,17 @@ void avcodec_default_free_buffers(AVCodecContext *s); · 2044 unmodified lines
38663832
38673833 /* misc useful functions */
38683834
3835+#if FF_API_OLD_FF_PICT_TYPES
38693836 /**
38703837 * Return a single letter to describe the given picture type pict_type.
38713838 *
38723839 * @param[in] pict_type the picture type
38733840 * @return A single character representing the picture type.
3841+ * @deprecated Use av_get_picture_type_char() instead.
38743842 */
3843+attribute_deprecated
38753844 char av_get_pict_type_char(int pict_type);
3845+#endif
38763846
38773847 /**
38783848 * Return codec bits per sample.
libavcodec/binkaudio.c+1−1
@@ -55,7 +55,7 @@ typedef struct { · 54 unmodified lines
5555 int num_bands;
5656 unsigned int *bands;
5757 float root;
58− DECLARE_ALIGNED(16, FFTSample, coeffs)[BINK_BLOCK_MAX_SIZE];
58+ DECLARE_ALIGNED(32, FFTSample, coeffs)[BINK_BLOCK_MAX_SIZE];
5959 DECLARE_ALIGNED(16, short, previous)[BINK_BLOCK_MAX_SIZE / 16]; ///< coeffs from previous audio block
6060 float *coeffs_ptr[MAX_CHANNELS]; ///< pointers to the coeffs arrays for float_to_int16_interleave
6161 union {
libavcodec/cook.c+1−1
@@ -153,7 +153,7 @@ typedef struct cook { · 152 unmodified lines
153153 /* data buffers */
154154
155155 uint8_t* decoded_bytes_buffer;
156− DECLARE_ALIGNED(16, float,mono_mdct_output)[2048];
156+ DECLARE_ALIGNED(32, float, mono_mdct_output)[2048];
157157 float decode_buffer_1[1024];
158158 float decode_buffer_2[1024];
159159 float decode_buffer_0[1060]; /* static allocation for joint decode */
libavcodec/dca.c+5−5
@@ -321,16 +321,16 @@ typedef struct { · 320 unmodified lines
321321
322322 /* Subband samples history (for ADPCM) */
323323 float subband_samples_hist[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][4];
324− DECLARE_ALIGNED(16, float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512];
325− DECLARE_ALIGNED(16, float, subband_fir_noidea)[DCA_PRIM_CHANNELS_MAX][32];
324+ DECLARE_ALIGNED(32, float, subband_fir_hist)[DCA_PRIM_CHANNELS_MAX][512];
325+ DECLARE_ALIGNED(32, float, subband_fir_noidea)[DCA_PRIM_CHANNELS_MAX][32];
326326 int hist_index[DCA_PRIM_CHANNELS_MAX];
327− DECLARE_ALIGNED(16, float, raXin)[32];
327+ DECLARE_ALIGNED(32, float, raXin)[32];
328328
329329 int output; ///< type of output
330330 float scale_bias; ///< output scale
331331
332− DECLARE_ALIGNED(16, float, subband_samples)[DCA_BLOCKS_MAX][DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8];
333− DECLARE_ALIGNED(16, float, samples)[(DCA_PRIM_CHANNELS_MAX+1)*256];
332+ DECLARE_ALIGNED(32, float, subband_samples)[DCA_BLOCKS_MAX][DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8];
333+ DECLARE_ALIGNED(32, float, samples)[(DCA_PRIM_CHANNELS_MAX+1)*256];
334334 const float *samples_chanptr[DCA_PRIM_CHANNELS_MAX+1];
335335
336336 uint8_t dca_buffer[DCA_MAX_FRAME_SIZE + DCA_MAX_EXSS_HEADER_SIZE + DCA_BUFFER_PADDING_SIZE];
libavcodec/dct-test.c+1−4
@@ -312,18 +312,16 @@ static void dct_error(const char *name, int is_idct, · 311 unmodified lines
312312 }
313313 for(i=0; i<64; i++) sysErrMax= FFMAX(sysErrMax, FFABS(sysErr[i]));
314314
315−#if 1 // dump systematic errors
316315 for(i=0; i<64; i++){
317316 if(i%8==0) printf("\n");
318317 printf("%7d ", (int)sysErr[i]);
319318 }
320319 printf("\n");
321−#endif
322320
323321 printf("%s %s: err_inf=%d err2=%0.8f syserr=%0.8f maxout=%d blockSumErr=%d\n",
324322 is_idct ? "IDCT" : "DCT",
325323 name, err_inf, (double)err2 / NB_ITS / 64.0, (double)sysErrMax / NB_ITS, maxout, blockSumErrMax);
326−#if 1 //Speed test
324+
327325 /* speed test */
328326 for(i=0;i<64;i++)
329327 block1[i] = 0;
@@ -376,7 +374,6 @@ static void dct_error(const char *name, int is_idct, · 46 unmodified lines
376374 printf("%s %s: %0.1f kdct/s\n",
377375 is_idct ? "IDCT" : "DCT",
378376 name, (double)it1 * 1000.0 / (double)ti1);
379−#endif
380377 }
381378
382379 DECLARE_ALIGNED(8, static uint8_t, img_dest)[64];
libavcodec/error_resilience.c+5−12
@@ -786,7 +786,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 785 unmodified lines
786786 }
787787 }
788788
789−#if 1
790789 /* handle overlapping slices */
791790 for(error_type=1; error_type<=3; error_type++){
792791 int end_ok=0;
@@ -807,8 +806,7 @@ void ff_er_frame_end(MpegEncContext *s){ · 14 unmodified lines
807806 end_ok=0;
808807 }
809808 }
810−#endif
811−#if 1
809+
812810 /* handle slices with partitions of different length */
813811 if(s->partitioned_frame){
814812 int end_ok=0;
@@ -829,7 +827,7 @@ void ff_er_frame_end(MpegEncContext *s){ · 14 unmodified lines
829827 end_ok=0;
830828 }
831829 }
832−#endif
830+
833831 /* handle missing slices */
834832 if(s->error_recognition>=4){
835833 int end_ok=1;
@@ -853,7 +851,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 17 unmodified lines
853851 }
854852 }
855853
856−#if 1
857854 /* backward mark errors */
858855 distance=9999999;
859856 for(error_type=1; error_type<=3; error_type++){
@@ -878,7 +875,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 18 unmodified lines
878875 distance= 9999999;
879876 }
880877 }
881−#endif
882878
883879 /* forward mark errors */
884880 error=0;
@@ -893,7 +889,7 @@ void ff_er_frame_end(MpegEncContext *s){ · 8 unmodified lines
893889 s->error_status_table[mb_xy]|= error;
894890 }
895891 }
896−#if 1
892+
897893 /* handle not partitioned case */
898894 if(!s->partitioned_frame){
899895 for(i=0; i<s->mb_num; i++){
@@ -904,7 +900,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 4 unmodified lines
904900 s->error_status_table[mb_xy]= error;
905901 }
906902 }
907−#endif
908903
909904 dc_error= ac_error= mv_error=0;
910905 for(i=0; i<s->mb_num; i++){
@@ -1065,16 +1060,15 @@ void ff_er_frame_end(MpegEncContext *s){ · 154 unmodified lines
10651060 s->dc_val[2][mb_x + mb_y*s->mb_stride]= (dcv+4)>>3;
10661061 }
10671062 }
1068−#if 1
1063+
10691064 /* guess DC for damaged blocks */
10701065 guess_dc(s, s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride, 1);
10711066 guess_dc(s, s->dc_val[1], s->mb_width , s->mb_height , s->mb_stride, 0);
10721067 guess_dc(s, s->dc_val[2], s->mb_width , s->mb_height , s->mb_stride, 0);
1073−#endif
1068+
10741069 /* filter luma DC */
10751070 filter181(s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride);
10761071
1077−#if 1
10781072 /* render DC only intra */
10791073 for(mb_y=0; mb_y<s->mb_height; mb_y++){
10801074 for(mb_x=0; mb_x<s->mb_width; mb_x++){
@@ -1094,7 +1088,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 13 unmodified lines
10941088 put_dc(s, dest_y, dest_cb, dest_cr, mb_x, mb_y);
10951089 }
10961090 }
1097−#endif
10981091
10991092 if(s->avctx->error_concealment&FF_EC_DEBLOCK){
11001093 /* filter horizontal block boundaries */
libavcodec/fft.c+48−5
@@ -93,6 +93,44 @@ av_cold void ff_init_ff_cos_tabs(int index) · 92 unmodified lines
9393 #endif
9494 }
9595
96+static const int avx_tab[] = {
97+ 0, 4, 1, 5, 8, 12, 9, 13, 2, 6, 3, 7, 10, 14, 11, 15
98+};
99+
100+static int is_second_half_of_fft32(int i, int n)
101+{
102+ if (n <= 32)
103+ return i >= 16;
104+ else if (i < n/2)
105+ return is_second_half_of_fft32(i, n/2);
106+ else if (i < 3*n/4)
107+ return is_second_half_of_fft32(i - n/2, n/4);
108+ else
109+ return is_second_half_of_fft32(i - 3*n/4, n/4);
110+}
111+
112+static av_cold void fft_perm_avx(FFTContext *s)
113+{
114+ int i;
115+ int n = 1 << s->nbits;
116+
117+ for (i = 0; i < n; i += 16) {
118+ int k;
119+ if (is_second_half_of_fft32(i, n)) {
120+ for (k = 0; k < 16; k++)
121+ s->revtab[-split_radix_permutation(i + k, n, s->inverse) & (n - 1)] =
122+ i + avx_tab[k];
123+
124+ } else {
125+ for (k = 0; k < 16; k++) {
126+ int j = i + k;
127+ j = (j & ~7) | ((j >> 1) & 3) | ((j << 2) & 4);
128+ s->revtab[-split_radix_permutation(i + k, n, s->inverse) & (n - 1)] = j;
129+ }
130+ }
131+ }
132+}
133+
96134 av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
97135 {
98136 int i, j, n;
@@ -132,11 +170,16 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) · 33 unmodified lines
132170 for(j=4; j<=nbits; j++) {
133171 ff_init_ff_cos_tabs(j);
134172 }
135− for(i=0; i<n; i++) {
136− int j = i;
137− if (s->fft_permutation == FF_FFT_PERM_SWAP_LSBS)
138− j = (j&~3) | ((j>>1)&1) | ((j<<1)&2);
139− s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = j;
173+
174+ if (s->fft_permutation == FF_FFT_PERM_AVX) {
175+ fft_perm_avx(s);
176+ } else {
177+ for(i=0; i<n; i++) {
178+ int j = i;
179+ if (s->fft_permutation == FF_FFT_PERM_SWAP_LSBS)
180+ j = (j&~3) | ((j>>1)&1) | ((j<<1)&2);
181+ s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = j;
182+ }
140183 }
141184
142185 return 0;
libavcodec/fft.h+2−1
@@ -85,6 +85,7 @@ struct FFTContext { · 84 unmodified lines
8585 int fft_permutation;
8686 #define FF_FFT_PERM_DEFAULT 0
8787 #define FF_FFT_PERM_SWAP_LSBS 1
88+#define FF_FFT_PERM_AVX 2
8889 int mdct_permutation;
8990 #define FF_MDCT_PERM_NONE 0
9091 #define FF_MDCT_PERM_INTERLEAVE 1
@@ -97,7 +98,7 @@ struct FFTContext { · 6 unmodified lines
9798 #endif
9899
99100 #define COSTABLE(size) \
100− COSTABLE_CONST DECLARE_ALIGNED(16, FFTSample, FFT_NAME(ff_cos_##size))[size/2]
101+ COSTABLE_CONST DECLARE_ALIGNED(32, FFTSample, FFT_NAME(ff_cos_##size))[size/2]
101102
102103 extern COSTABLE(16);
103104 extern COSTABLE(32);
libavcodec/h261dec.c+0−4
@@ -599,10 +599,6 @@ retry: · 598 unmodified lines
599599 s->current_picture.pict_type= s->pict_type;
600600 s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
601601
602−#if FF_API_HURRY_UP
603− /* skip everything if we are in a hurry>=5 */
604− if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size);
605−#endif
606602 if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
607603 ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
608604 || avctx->skip_frame >= AVDISCARD_ALL)
libavcodec/h263dec.c+0−8
@@ -612,18 +612,10 @@ retry: · 611 unmodified lines
612612
613613 /* skip B-frames if we don't have reference frames */
614614 if(s->last_picture_ptr==NULL && (s->pict_type==FF_B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size);
615−#if FF_API_HURRY_UP
616− /* skip b frames if we are in a hurry */
617− if(avctx->hurry_up && s->pict_type==FF_B_TYPE) return get_consumed_bytes(s, buf_size);
618−#endif
619615 if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
620616 || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
621617 || avctx->skip_frame >= AVDISCARD_ALL)
622618 return get_consumed_bytes(s, buf_size);
623−#if FF_API_HURRY_UP
624− /* skip everything if we are in a hurry>=5 */
625− if(avctx->hurry_up>=5) return get_consumed_bytes(s, buf_size);
626−#endif
627619
628620 if(s->next_p_frame_damaged){
629621 if(s->pict_type==FF_B_TYPE)
libavcodec/h264.c+2−16
@@ -2966,11 +2966,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ · 2965 unmodified lines
29662966 buf_index += consumed;
29672967
29682968 //FIXME do not discard SEI id
2969− if(
2970−#if FF_API_HURRY_UP
2971− (s->hurry_up == 1 && h->nal_ref_idc == 0) ||
2972−#endif
2973− (avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0))
2969+ if(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc == 0)
29742970 continue;
29752971
29762972 again:
@@ -3007,9 +3003,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ · 30 unmodified lines
30073003 }
30083004
30093005 if(hx->redundant_pic_count==0
3010−#if FF_API_HURRY_UP
3011− && hx->s.hurry_up < 5
3012−#endif
30133006 && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
30143007 && (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=FF_B_TYPE)
30153008 && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
@@ -3047,9 +3040,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ · 31 unmodified lines
30473040
30483041 if(hx->redundant_pic_count==0 && hx->intra_gb_ptr && hx->s.data_partitioning
30493042 && s->context_initialized
3050−#if FF_API_HURRY_UP
3051− && s->hurry_up < 5
3052−#endif
30533043 && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc)
30543044 && (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=FF_B_TYPE)
30553045 && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
@@ -3186,11 +3176,7 @@ static int decode_frame(AVCodecContext *avctx, · 130 unmodified lines
31863176 }
31873177
31883178 if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
3189− if (avctx->skip_frame >= AVDISCARD_NONREF
3190−#if FF_API_HURRY_UP
3191− || s->hurry_up
3192−#endif
3193− )
3179+ if (avctx->skip_frame >= AVDISCARD_NONREF)
31943180 return 0;
31953181 av_log(avctx, AV_LOG_ERROR, "no frame!\n");
31963182 return -1;
libavcodec/h264.h+0−2
@@ -1007,7 +1007,6 @@ static void fill_decode_caches(H264Context *h, int mb_type){ · 1006 unmodified lines
10071007 }
10081008 }
10091009
1010−#if 1
10111010 if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){
10121011 int list;
10131012 for(list=0; list<h->list_count; list++){
@@ -1182,7 +1181,6 @@ static void fill_decode_caches(H264Context *h, int mb_type){ · 168 unmodified lines
11821181 }
11831182 }
11841183 }
1185−#endif
11861184
11871185 h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]);
11881186 }
libavcodec/imc.c+1−1
@@ -88,7 +88,7 @@ typedef struct { · 87 unmodified lines
8888
8989 DSPContext dsp;
9090 FFTContext fft;
91− DECLARE_ALIGNED(16, FFTComplex, samples)[COEFFS/2];
91+ DECLARE_ALIGNED(32, FFTComplex, samples)[COEFFS/2];
9292 float *out_samples;
9393 } IMCContext;
9494
libavcodec/motion_est_template.c+0−2
@@ -158,7 +158,6 @@ static int hpel_motion_search(MpegEncContext * s, · 157 unmodified lines
158158 const int b= score_map[(index+(1<<ME_MAP_SHIFT))&(ME_MAP_SIZE-1)]
159159 + (mv_penalty[bx - pred_x] + mv_penalty[by+2 - pred_y])*c->penalty_factor;
160160
161−#if 1
162161 int key;
163162 int map_generation= c->map_generation;
164163 #ifndef NDEBUG
@@ -172,7 +171,6 @@ static int hpel_motion_search(MpegEncContext * s, · 7 unmodified lines
172171 assert(map[(index+1)&(ME_MAP_SIZE-1)] == key);
173172 key= ((my)<<ME_MAP_MV_BITS) + (mx-1) + map_generation;
174173 assert(map[(index-1)&(ME_MAP_SIZE-1)] == key);
175−#endif
176174 if(t<=b){
177175 CHECK_HALF_MV(0, 1, mx ,my-1)
178176 if(l<=r){
libavcodec/mpeg12.c+0−8
@@ -2476,18 +2476,10 @@ static int decode_chunks(AVCodecContext *avctx, · 2475 unmodified lines
24762476 /* Skip P-frames if we do not have a reference frame or we have an invalid header. */
24772477 if(s2->pict_type==FF_P_TYPE && !s->sync) break;
24782478 }
2479−#if FF_API_HURRY_UP
2480− /* Skip B-frames if we are in a hurry. */
2481− if(avctx->hurry_up && s2->pict_type==FF_B_TYPE) break;
2482−#endif
24832479 if( (avctx->skip_frame >= AVDISCARD_NONREF && s2->pict_type==FF_B_TYPE)
24842480 ||(avctx->skip_frame >= AVDISCARD_NONKEY && s2->pict_type!=FF_I_TYPE)
24852481 || avctx->skip_frame >= AVDISCARD_ALL)
24862482 break;
2487−#if FF_API_HURRY_UP
2488− /* Skip everything if we are in a hurry>=5. */
2489− if(avctx->hurry_up>=5) break;
2490−#endif
24912483
24922484 if (!s->mpeg_enc_ctx_allocated) break;
24932485
libavcodec/mpegvideo.c+0−6
@@ -1131,9 +1131,6 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 1130 unmodified lines
11311131 }
11321132 }
11331133
1134−#if FF_API_HURRY_UP
1135− s->hurry_up= s->avctx->hurry_up;
1136−#endif
11371134 s->error_recognition= avctx->error_recognition;
11381135
11391136 /* set dequantizer, we can't do it during init as it might change for mpeg4
@@ -2125,9 +2122,6 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 985 unmodified lines
21252122 }
21262123
21272124 /* skip dequant / idct if we are really late ;) */
2128−#if FF_API_HURRY_UP
2129− if(s->hurry_up>1) goto skip_idct;
2130−#endif
21312125 if(s->avctx->skip_idct){
21322126 if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type == FF_B_TYPE)
21332127 ||(s->avctx->skip_idct >= AVDISCARD_NONKEY && s->pict_type != FF_I_TYPE)
libavcodec/mpegvideo.h+0−5
@@ -391,11 +391,6 @@ typedef struct MpegEncContext { · 390 unmodified lines
391391 int no_rounding; /**< apply no rounding to motion compensation (MPEG4, msmpeg4, ...)
392392 for b-frames rounding mode is always 0 */
393393
394−#if FF_API_HURRY_UP
395− int hurry_up; /**< when set to 1 during decoding, b frames will be skipped
396− when set to 2 idct/dequant will be skipped too */
397−#endif
398−
399394 /* macroblock layer */
400395 int mb_x, mb_y;
401396 int mb_skip_run;
libavcodec/msmpeg4.c+3−4
@@ -985,10 +985,9 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) · 984 unmodified lines
985985 if(level<=MAX_LEVEL && run<=MAX_RUN){
986986 s->ac_stats[s->mb_intra][n>3][level][run][last]++;
987987 }
988−#if 0
989−else
990− s->ac_stats[s->mb_intra][n>3][40][63][0]++; //esc3 like
991−#endif
988+
989+ s->ac_stats[s->mb_intra][n > 3][40][63][0]++; //esc3 like
990+
992991 code = get_rl_index(rl, last, run, level);
993992 put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
994993 if (code == rl->n) {
libavcodec/nellymoserdec.c+2−2
@@ -47,7 +47,7 @@ · 46 unmodified lines
4747
4848 typedef struct NellyMoserDecodeContext {
4949 AVCodecContext* avctx;
50− DECLARE_ALIGNED(16, float,float_buf)[NELLY_SAMPLES];
50+ DECLARE_ALIGNED(32, float, float_buf)[NELLY_SAMPLES];
5151 float state[128];
5252 AVLFG random_state;
5353 GetBitContext gb;
@@ -55,7 +55,7 @@ typedef struct NellyMoserDecodeContext { · 1 unmodified line
5555 DSPContext dsp;
5656 FFTContext imdct_ctx;
5757 FmtConvertContext fmt_conv;
58− DECLARE_ALIGNED(16, float,imdct_out)[NELLY_BUF_LEN * 2];
58+ DECLARE_ALIGNED(32, float, imdct_out)[NELLY_BUF_LEN * 2];
5959 } NellyMoserDecodeContext;
6060
6161 static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *audio, float *a_in)
libavcodec/nellymoserenc.c+3−3
@@ -55,9 +55,9 @@ typedef struct NellyMoserEncodeContext { · 54 unmodified lines
5555 int have_saved;
5656 DSPContext dsp;
5757 FFTContext mdct_ctx;
58− DECLARE_ALIGNED(16, float, mdct_out)[NELLY_SAMPLES];
59− DECLARE_ALIGNED(16, float, in_buff)[NELLY_SAMPLES];
60− DECLARE_ALIGNED(16, float, buf)[2][3 * NELLY_BUF_LEN]; ///< sample buffer
58+ DECLARE_ALIGNED(32, float, mdct_out)[NELLY_SAMPLES];
59+ DECLARE_ALIGNED(32, float, in_buff)[NELLY_SAMPLES];
60+ DECLARE_ALIGNED(32, float, buf)[2][3 * NELLY_BUF_LEN]; ///< sample buffer
6161 float (*opt )[NELLY_BANDS];
6262 uint8_t (*path)[NELLY_BANDS];
6363 } NellyMoserEncodeContext;
libavcodec/options.c+0−10
@@ -105,9 +105,6 @@ static const AVOption options[]={ · 104 unmodified lines
105105 {"extradata_size", NULL, OFFSET(extradata_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
106106 {"time_base", NULL, OFFSET(time_base), FF_OPT_TYPE_RATIONAL, DEFAULT, INT_MIN, INT_MAX},
107107 {"g", "set the group of picture size", OFFSET(gop_size), FF_OPT_TYPE_INT, 12, INT_MIN, INT_MAX, V|E},
108−#if FF_API_RATE_EMU
109−{"rate_emu", "frame rate emulation", OFFSET(rate_emu), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
110−#endif
111108 {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
112109 {"ac", "set number of audio channels", OFFSET(channels), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
113110 {"cutoff", "set cutoff bandwidth", OFFSET(cutoff), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, A|E},
@@ -124,9 +121,6 @@ static const AVOption options[]={ · 10 unmodified lines
124121 {"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
125122 {"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX, V|E},
126123 {"wpredp", "weighted prediction analysis method", OFFSET(weighted_p_pred), FF_OPT_TYPE_INT, 0, INT_MIN, INT_MAX, V|E},
127−#if FF_API_HURRY_UP
128−{"hurry_up", "deprecated, use skip_idct/skip_frame instead", OFFSET(hurry_up), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|D},
129−#endif
130124 {"ps", "rtp payload size in bytes", OFFSET(rtp_payload_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
131125 {"mv_bits", NULL, OFFSET(mv_bits), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
132126 {"header_bits", NULL, OFFSET(header_bits), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
@@ -253,10 +247,6 @@ static const AVOption options[]={ · 120 unmodified lines
253247 {"pf", "forward predicted MVs of P-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_P_FOR, INT_MIN, INT_MAX, V|D, "debug_mv"},
254248 {"bf", "forward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_B_FOR, INT_MIN, INT_MAX, V|D, "debug_mv"},
255249 {"bb", "backward predicted MVs of B-frames", 0, FF_OPT_TYPE_CONST, FF_DEBUG_VIS_MV_B_BACK, INT_MIN, INT_MAX, V|D, "debug_mv"},
256−#if FF_API_MB_Q
257−{"mb_qmin", "obsolete, use qmin", OFFSET(mb_qmin), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
258−{"mb_qmax", "obsolete, use qmax", OFFSET(mb_qmax), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
259−#endif
260250 {"cmp", "full pel me compare function", OFFSET(me_cmp), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E, "cmp_func"},
261251 {"subcmp", "sub pel me compare function", OFFSET(me_sub_cmp), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E, "cmp_func"},
262252 {"mbcmp", "macroblock compare function", OFFSET(mb_cmp), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E, "cmp_func"},
libavcodec/pthread.c+0−3
@@ -380,9 +380,6 @@ static void update_context_from_user(AVCodecContext *dst, AVCodecContext *src) · 379 unmodified lines
380380 dst->release_buffer = src->release_buffer;
381381
382382 dst->opaque = src->opaque;
383−#if FF_API_HURRY_UP
384− dst->hurry_up = src->hurry_up;
385−#endif
386383 dst->dsp_mask = src->dsp_mask;
387384 dst->debug = src->debug;
388385 dst->debug_mv = src->debug_mv;
libavcodec/qdm2.c+1−1
@@ -120,7 +120,7 @@ typedef struct { · 119 unmodified lines
120120 } FFTCoefficient;
121121
122122 typedef struct {
123− DECLARE_ALIGNED(16, QDM2Complex, complex)[MPA_MAX_CHANNELS][256];
123+ DECLARE_ALIGNED(32, QDM2Complex, complex)[MPA_MAX_CHANNELS][256];
124124 } QDM2FFT;
125125
126126 /**
libavcodec/rv34.c+0−9
@@ -1454,19 +1454,10 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, · 1453 unmodified lines
14541454 }
14551455 if((!s->last_picture_ptr || !s->last_picture_ptr->data[0]) && si.type == FF_B_TYPE)
14561456 return -1;
1457−#if FF_API_HURRY_UP
1458− /* skip b frames if we are in a hurry */
1459− if(avctx->hurry_up && si.type==FF_B_TYPE) return buf_size;
1460−#endif
14611457 if( (avctx->skip_frame >= AVDISCARD_NONREF && si.type==FF_B_TYPE)
14621458 || (avctx->skip_frame >= AVDISCARD_NONKEY && si.type!=FF_I_TYPE)
14631459 || avctx->skip_frame >= AVDISCARD_ALL)
14641460 return buf_size;
1465−#if FF_API_HURRY_UP
1466− /* skip everything if we are in a hurry>=5 */
1467− if(avctx->hurry_up>=5)
1468− return buf_size;
1469−#endif
14701461
14711462 for(i=0; i<slice_count; i++){
14721463 int offset= get_slice_offset(avctx, slices_hdr, i);
libavcodec/sh4/qpel.c+0−2
@@ -897,7 +897,6 @@ QPEL_MC(0, avg_ , _ , op_avg) · 896 unmodified lines
897897 #undef op_put
898898 #undef op_put_no_rnd
899899
900−#if 1
901900 #define H264_LOWPASS(OPNAME, OP, OP2) \
902901 static inline void OPNAME ## h264_qpel_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,int w,int h){\
903902 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
@@ -1298,7 +1297,6 @@ H264_MC(avg_, 16) · 394 unmodified lines
12981297 #undef op_put
12991298 #undef op2_avg
13001299 #undef op2_put
1301−#endif
13021300
13031301 static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){
13041302 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
libavcodec/snow.c+0−2
@@ -3293,10 +3293,8 @@ static void iterative_me(SnowContext *s){ · 3292 unmodified lines
32933293 }
32943294 best_rd= ref_rd;
32953295 *block= ref_b;
3296−#if 1
32973296 check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd);
32983297 //FIXME RD style color selection
3299−#endif
33003298 if(!same_block(block, &backup)){
33013299 if(tb ) tb ->type &= ~BLOCK_OPT;
33023300 if(lb ) lb ->type &= ~BLOCK_OPT;
libavcodec/svq1dec.c+0−3
@@ -684,9 +684,6 @@ static int svq1_decode_frame(AVCodecContext *avctx, · 683 unmodified lines
684684 //this should be removed after libavcodec can handle more flexible picture types & ordering
685685 if(s->pict_type==FF_B_TYPE && s->last_picture_ptr==NULL) return buf_size;
686686
687−#if FF_API_HURRY_UP
688− if(avctx->hurry_up && s->pict_type==FF_B_TYPE) return buf_size;
689−#endif
690687 if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
691688 ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
692689 || avctx->skip_frame >= AVDISCARD_ALL)
libavcodec/svq3.c+0−8
@@ -952,14 +952,6 @@ static int svq3_decode_frame(AVCodecContext *avctx, · 951 unmodified lines
952952 /* Skip B-frames if we do not have reference frames. */
953953 if (s->last_picture_ptr == NULL && s->pict_type == FF_B_TYPE)
954954 return 0;
955−#if FF_API_HURRY_UP
956− /* Skip B-frames if we are in a hurry. */
957− if (avctx->hurry_up && s->pict_type == FF_B_TYPE)
958− return 0;
959− /* Skip everything if we are in a hurry >= 5. */
960− if (avctx->hurry_up >= 5)
961− return 0;
962−#endif
963955 if ( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == FF_B_TYPE)
964956 ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != FF_I_TYPE)
965957 || avctx->skip_frame >= AVDISCARD_ALL)
libavcodec/utils.c+3−10
@@ -1105,18 +1105,11 @@ void avcodec_default_free_buffers(AVCodecContext *s){ · 1104 unmodified lines
11051105 s->internal_buffer_count=0;
11061106 }
11071107
1108+#if FF_API_OLD_FF_PICT_TYPES
11081109 char av_get_pict_type_char(int pict_type){
1109− switch(pict_type){
1110− case FF_I_TYPE: return 'I';
1111− case FF_P_TYPE: return 'P';
1112− case FF_B_TYPE: return 'B';
1113− case FF_S_TYPE: return 'S';
1114− case FF_SI_TYPE:return 'i';
1115− case FF_SP_TYPE:return 'p';
1116− case FF_BI_TYPE:return 'b';
1117− default: return '?';
1118− }
1110+ return av_get_picture_type_char(pict_type);
11191111 }
1112+#endif
11201113
11211114 int av_get_bits_per_sample(enum CodecID codec_id){
11221115 switch(codec_id){
libavcodec/vc1dec.c+0−10
@@ -3519,21 +3519,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, · 3518 unmodified lines
35193519 if(s->last_picture_ptr==NULL && (s->pict_type==FF_B_TYPE || s->dropable)){
35203520 goto err;
35213521 }
3522−#if FF_API_HURRY_UP
3523− /* skip b frames if we are in a hurry */
3524− if(avctx->hurry_up && s->pict_type==FF_B_TYPE) return -1;//buf_size;
3525−#endif
35263522 if( (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
35273523 || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
35283524 || avctx->skip_frame >= AVDISCARD_ALL) {
35293525 goto end;
35303526 }
3531−#if FF_API_HURRY_UP
3532− /* skip everything if we are in a hurry>=5 */
3533− if(avctx->hurry_up>=5) {
3534− goto err;
3535− }
3536−#endif
35373527
35383528 if(s->next_p_frame_damaged){
35393529 if(s->pict_type==FF_B_TYPE)
libavcodec/version.h+4−10
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222
2323 #define LIBAVCODEC_VERSION_MAJOR 53
2424 #define LIBAVCODEC_VERSION_MINOR 1
25−#define LIBAVCODEC_VERSION_MICRO 0
25+#define LIBAVCODEC_VERSION_MICRO 1
2626
2727 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
2828 LIBAVCODEC_VERSION_MINOR, \
@@ -47,15 +47,6 @@ · 18 unmodified lines
4747 #ifndef FF_API_OLD_AUDIOCONVERT
4848 #define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 54)
4949 #endif
50−#ifndef FF_API_HURRY_UP
51−#define FF_API_HURRY_UP (LIBAVCODEC_VERSION_MAJOR < 53)
52−#endif
53−#ifndef FF_API_RATE_EMU
54−#define FF_API_RATE_EMU (LIBAVCODEC_VERSION_MAJOR < 53)
55−#endif
56−#ifndef FF_API_MB_Q
57−#define FF_API_MB_Q (LIBAVCODEC_VERSION_MAJOR < 53)
58−#endif
5950 #ifndef FF_API_ANTIALIAS_ALGO
6051 #define FF_API_ANTIALIAS_ALGO (LIBAVCODEC_VERSION_MAJOR < 54)
6152 #endif
@@ -68,5 +59,8 @@ · 6 unmodified lines
6859 #ifndef FF_API_THREAD_INIT
6960 #define FF_API_THREAD_INIT (LIBAVCODEC_VERSION_MAJOR < 54)
7061 #endif
62+#ifndef FF_API_OLD_FF_PICT_TYPES
63+#define FF_API_OLD_FF_PICT_TYPES (LIBAVCODEC_VERSION_MAJOR < 54)
64+#endif
7165
7266 #endif /* AVCODEC_VERSION_H */
libavcodec/wma.h+4−4
@@ -113,15 +113,15 @@ typedef struct WMACodecContext { · 112 unmodified lines
113113 uint8_t ms_stereo; ///< true if mid/side stereo mode
114114 uint8_t channel_coded[MAX_CHANNELS]; ///< true if channel is coded
115115 int exponents_bsize[MAX_CHANNELS]; ///< log2 ratio frame/exp. length
116− DECLARE_ALIGNED(16, float, exponents)[MAX_CHANNELS][BLOCK_MAX_SIZE];
116+ DECLARE_ALIGNED(32, float, exponents)[MAX_CHANNELS][BLOCK_MAX_SIZE];
117117 float max_exponent[MAX_CHANNELS];
118118 WMACoef coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE];
119− DECLARE_ALIGNED(16, float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE];
120− DECLARE_ALIGNED(16, FFTSample, output)[BLOCK_MAX_SIZE * 2];
119+ DECLARE_ALIGNED(32, float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE];
120+ DECLARE_ALIGNED(32, FFTSample, output)[BLOCK_MAX_SIZE * 2];
121121 FFTContext mdct_ctx[BLOCK_NB_SIZES];
122122 float *windows[BLOCK_NB_SIZES];
123123 /* output buffer for one frame and the last for IMDCT windowing */
124− DECLARE_ALIGNED(16, float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
124+ DECLARE_ALIGNED(32, float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
125125 /* last frame info */
126126 uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + 4]; /* padding added */
127127 int last_bitoffset;
libavcodec/wmaprodec.c+2−2
@@ -145,7 +145,7 @@ typedef struct { · 144 unmodified lines
145145 uint8_t table_idx; ///< index in sf_offsets for the scale factor reference block
146146 float* coeffs; ///< pointer to the subframe decode buffer
147147 uint16_t num_vec_coeffs; ///< number of vector coded coefficients
148− DECLARE_ALIGNED(16, float, out)[WMAPRO_BLOCK_MAX_SIZE + WMAPRO_BLOCK_MAX_SIZE / 2]; ///< output buffer
148+ DECLARE_ALIGNED(32, float, out)[WMAPRO_BLOCK_MAX_SIZE + WMAPRO_BLOCK_MAX_SIZE / 2]; ///< output buffer
149149 } WMAProChannelCtx;
150150
151151 /**
@@ -170,7 +170,7 @@ typedef struct WMAProDecodeCtx { · 18 unmodified lines
170170 FF_INPUT_BUFFER_PADDING_SIZE];///< compressed frame data
171171 PutBitContext pb; ///< context for filling the frame_data buffer
172172 FFTContext mdct_ctx[WMAPRO_BLOCK_SIZES]; ///< MDCT context per block size
173− DECLARE_ALIGNED(16, float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output buffer
173+ DECLARE_ALIGNED(32, float, tmp)[WMAPRO_BLOCK_MAX_SIZE]; ///< IMDCT output buffer
174174 float* windows[WMAPRO_BLOCK_SIZES]; ///< windows for the different block sizes
175175
176176 /* frame size dependent frame information (set during initialization) */
libavcodec/wmavoice.c+3−3
@@ -275,11 +275,11 @@ typedef struct { · 274 unmodified lines
275275 ///< by postfilter
276276 float denoise_filter_cache[MAX_FRAMESIZE];
277277 int denoise_filter_cache_size; ///< samples in #denoise_filter_cache
278− DECLARE_ALIGNED(16, float, tilted_lpcs_pf)[0x80];
278+ DECLARE_ALIGNED(32, float, tilted_lpcs_pf)[0x80];
279279 ///< aligned buffer for LPC tilting
280− DECLARE_ALIGNED(16, float, denoise_coeffs_pf)[0x80];
280+ DECLARE_ALIGNED(32, float, denoise_coeffs_pf)[0x80];
281281 ///< aligned buffer for denoise coefficients
282− DECLARE_ALIGNED(16, float, synth_filter_out_buf)[0x80 + MAX_LSPS_ALIGN16];
282+ DECLARE_ALIGNED(32, float, synth_filter_out_buf)[0x80 + MAX_LSPS_ALIGN16];
283283 ///< aligned buffer for postfilter speech
284284 ///< synthesis
285285 /**
libavcodec/x86/fft.c+8−1
@@ -25,7 +25,14 @@ av_cold void ff_fft_init_mmx(FFTContext *s) · 24 unmodified lines
2525 {
2626 #if HAVE_YASM
2727 int has_vectors = av_get_cpu_flags();
28− if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) {
28+ if (has_vectors & AV_CPU_FLAG_AVX && HAVE_AVX && s->nbits >= 5) {
29+ /* AVX for SB */
30+ s->imdct_calc = ff_imdct_calc_sse;
31+ s->imdct_half = ff_imdct_half_avx;
32+ s->fft_permute = ff_fft_permute_sse;
33+ s->fft_calc = ff_fft_calc_avx;
34+ s->fft_permutation = FF_FFT_PERM_AVX;
35+ } else if (has_vectors & AV_CPU_FLAG_SSE && HAVE_SSE) {
2936 /* SSE for P3/P4/K8 */
3037 s->imdct_calc = ff_imdct_calc_sse;
3138 s->imdct_half = ff_imdct_half_sse;
libavcodec/x86/fft.h+2−0
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 #include "libavcodec/fft.h"
2323
2424 void ff_fft_permute_sse(FFTContext *s, FFTComplex *z);
25+void ff_fft_calc_avx(FFTContext *s, FFTComplex *z);
2526 void ff_fft_calc_sse(FFTContext *s, FFTComplex *z);
2627 void ff_fft_calc_3dn(FFTContext *s, FFTComplex *z);
2728 void ff_fft_calc_3dn2(FFTContext *s, FFTComplex *z);
@@ -32,6 +33,7 @@ void ff_imdct_calc_3dn2(FFTContext *s, FFTSample *output, const FFTSample *input · 4 unmodified lines
3233 void ff_imdct_half_3dn2(FFTContext *s, FFTSample *output, const FFTSample *input);
3334 void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input);
3435 void ff_imdct_half_sse(FFTContext *s, FFTSample *output, const FFTSample *input);
36+void ff_imdct_half_avx(FFTContext *s, FFTSample *output, const FFTSample *input);
3537 void ff_dct32_float_sse(FFTSample *out, const FFTSample *in);
3638
3739 #endif
libavcodec/x86/fft_mmx.asm+334−150
@@ -1,6 +1,7 @@
11 ;******************************************************************************
22 ;* FFT transform with SSE/3DNow optimizations
33 ;* Copyright (c) 2008 Loren Merritt
4+;* Copyright (c) 2011 Vitor Sessak
45 ;*
56 ;* This algorithm (though not any of the implementation details) is
67 ;* based on libdjbfft by D. J. Bernstein.
@@ -49,9 +50,21 @@ endstruc · 42 unmodified lines
4950 SECTION_RODATA
5051
5152 %define M_SQRT1_2 0.70710678118654752440
52−ps_root2: times 4 dd M_SQRT1_2
53−ps_root2mppm: dd -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
54−ps_p1p1m1p1: dd 0, 0, 1<<31, 0
53+%define M_COS_PI_1_8 0.923879532511287
54+%define M_COS_PI_3_8 0.38268343236509
55+
56+align 32
57+ps_cos16_1: dd 1.0, M_COS_PI_1_8, M_SQRT1_2, M_COS_PI_3_8, 1.0, M_COS_PI_1_8, M_SQRT1_2, M_COS_PI_3_8
58+ps_cos16_2: dd 0, M_COS_PI_3_8, M_SQRT1_2, M_COS_PI_1_8, 0, -M_COS_PI_3_8, -M_SQRT1_2, -M_COS_PI_1_8
59+
60+ps_root2: times 8 dd M_SQRT1_2
61+ps_root2mppm: dd -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2, -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
62+ps_p1p1m1p1: dd 0, 0, 1<<31, 0, 0, 0, 1<<31, 0
63+
64+perm1: dd 0x00, 0x02, 0x03, 0x01, 0x03, 0x00, 0x02, 0x01
65+perm2: dd 0x00, 0x01, 0x02, 0x03, 0x01, 0x00, 0x02, 0x03
66+ps_p1p1m1p1root2: dd 1.0, 1.0, -1.0, 1.0, M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, M_SQRT1_2
67+ps_m1m1p1m1p1m1m1m1: dd 1<<31, 1<<31, 0, 1<<31, 0, 1<<31, 1<<31, 1<<31
5568 ps_m1p1: dd 1<<31, 0
5669
5770 %assign i 16
@@ -96,51 +109,80 @@ section .text align=16 · 38 unmodified lines
96109 SWAP %3, %6
97110 %endmacro
98111
112+; in: %1 = {r0,i0,r2,i2,r4,i4,r6,i6}
113+; %2 = {r1,i1,r3,i3,r5,i5,r7,i7}
114+; %3, %4, %5 tmp
115+; out: %1 = {r0,r1,r2,r3,i0,i1,i2,i3}
116+; %2 = {r4,r5,r6,r7,i4,i5,i6,i7}
117+%macro T8_AVX 5
118+ vsubps %5, %1, %2 ; v = %1 - %2
119+ vaddps %3, %1, %2 ; w = %1 + %2
120+ vmulps %2, %5, [ps_p1p1m1p1root2] ; v *= vals1
121+ vpermilps %2, %2, [perm1]
122+ vblendps %1, %2, %3, 0x33 ; q = {w1,w2,v4,v2,w5,w6,v7,v6}
123+ vshufps %5, %3, %2, 0x4e ; r = {w3,w4,v1,v3,w7,w8,v8,v5}
124+ vsubps %4, %5, %1 ; s = r - q
125+ vaddps %1, %5, %1 ; u = r + q
126+ vpermilps %1, %1, [perm2] ; k = {u1,u2,u3,u4,u6,u5,u7,u8}
127+ vshufps %5, %4, %1, 0xbb
128+ vshufps %3, %4, %1, 0xee
129+ vperm2f128 %3, %3, %5, 0x13
130+ vxorps %4, %4, [ps_m1m1p1m1p1m1m1m1] ; s *= {1,1,-1,-1,1,-1,-1,-1}
131+ vshufps %2, %1, %4, 0xdd
132+ vshufps %1, %1, %4, 0x88
133+ vperm2f128 %4, %2, %1, 0x02 ; v = {k1,k3,s1,s3,k2,k4,s2,s4}
134+ vperm2f128 %1, %1, %2, 0x13 ; w = {k6,k8,s6,s8,k5,k7,s5,s7}
135+ vsubps %5, %1, %3
136+ vblendps %1, %5, %1, 0x55 ; w -= {0,s7,0,k7,0,s8,0,k8}
137+ vsubps %2, %4, %1 ; %2 = v - w
138+ vaddps %1, %4, %1 ; %1 = v + w
139+%endmacro
140+
141+; In SSE mode do one fft4 transforms
99142 ; in: %1={r0,i0,r2,i2} %2={r1,i1,r3,i3}
100143 ; out: %1={r0,r1,r2,r3} %2={i0,i1,i2,i3}
144+;
145+; In AVX mode do two fft4 transforms
146+; in: %1={r0,i0,r2,i2,r4,i4,r6,i6} %2={r1,i1,r3,i3,r5,i5,r7,i7}
147+; out: %1={r0,r1,r2,r3,r4,r5,r6,r7} %2={i0,i1,i2,i3,i4,i5,i6,i7}
101148 %macro T4_SSE 3
102− mova %3, %1
103− addps %1, %2 ; {t1,t2,t6,t5}
104− subps %3, %2 ; {t3,t4,-t8,t7}
105− xorps %3, [ps_p1p1m1p1]
106− mova %2, %1
107− shufps %1, %3, 0x44 ; {t1,t2,t3,t4}
108− shufps %2, %3, 0xbe ; {t6,t5,t7,t8}
109− mova %3, %1
110− addps %1, %2 ; {r0,i0,r1,i1}
111− subps %3, %2 ; {r2,i2,r3,i3}
112− mova %2, %1
113− shufps %1, %3, 0x88 ; {r0,r1,r2,r3}
114− shufps %2, %3, 0xdd ; {i0,i1,i2,i3}
149+ subps %3, %1, %2 ; {t3,t4,-t8,t7}
150+ addps %1, %1, %2 ; {t1,t2,t6,t5}
151+ xorps %3, %3, [ps_p1p1m1p1]
152+ shufps %2, %1, %3, 0xbe ; {t6,t5,t7,t8}
153+ shufps %1, %1, %3, 0x44 ; {t1,t2,t3,t4}
154+ subps %3, %1, %2 ; {r2,i2,r3,i3}
155+ addps %1, %1, %2 ; {r0,i0,r1,i1}
156+ shufps %2, %1, %3, 0xdd ; {i0,i1,i2,i3}
157+ shufps %1, %1, %3, 0x88 ; {r0,r1,r2,r3}
115158 %endmacro
116159
160+; In SSE mode do one FFT8
117161 ; in: %1={r0,r1,r2,r3} %2={i0,i1,i2,i3} %3={r4,i4,r6,i6} %4={r5,i5,r7,i7}
118162 ; out: %1={r0,r1,r2,r3} %2={i0,i1,i2,i3} %1={r4,r5,r6,r7} %2={i4,i5,i6,i7}
163+;
164+; In AVX mode do two FFT8
165+; in: %1={r0,i0,r2,i2,r8, i8, r10,i10} %2={r1,i1,r3,i3,r9, i9, r11,i11}
166+; %3={r4,i4,r6,i6,r12,i12,r14,i14} %4={r5,i5,r7,i7,r13,i13,r15,i15}
167+; out: %1={r0,r1,r2,r3,r8, r9, r10,r11} %2={i0,i1,i2,i3,i8, i9, i10,i11}
168+; %3={r4,r5,r6,r7,r12,r13,r14,r15} %4={i4,i5,i6,i7,i12,i13,i14,i15}
119169 %macro T8_SSE 6
120− mova %6, %3
121− subps %3, %4 ; {r5,i5,r7,i7}
122− addps %6, %4 ; {t1,t2,t3,t4}
123− mova %4, %3
124− shufps %4, %4, 0xb1 ; {i5,r5,i7,r7}
125− mulps %3, [ps_root2mppm] ; {-r5,i5,r7,-i7}
126− mulps %4, [ps_root2]
127− addps %3, %4 ; {t8,t7,ta,t9}
128− mova %4, %6
129− shufps %6, %3, 0x36 ; {t3,t2,t9,t8}
130− shufps %4, %3, 0x9c ; {t1,t4,t7,ta}
131− mova %3, %6
132− addps %6, %4 ; {t1,t2,t9,ta}
133− subps %3, %4 ; {t6,t5,tc,tb}
134− mova %4, %6
135− shufps %6, %3, 0xd8 ; {t1,t9,t5,tb}
136− shufps %4, %3, 0x8d ; {t2,ta,t6,tc}
137− mova %3, %1
138− mova %5, %2
139− addps %1, %6 ; {r0,r1,r2,r3}
140− addps %2, %4 ; {i0,i1,i2,i3}
141− subps %3, %6 ; {r4,r5,r6,r7}
142− subps %5, %4 ; {i4,i5,i6,i7}
143− SWAP %4, %5
170+ addps %6, %3, %4 ; {t1,t2,t3,t4}
171+ subps %3, %3, %4 ; {r5,i5,r7,i7}
172+ shufps %4, %3, %3, 0xb1 ; {i5,r5,i7,r7}
173+ mulps %3, %3, [ps_root2mppm] ; {-r5,i5,r7,-i7}
174+ mulps %4, %4, [ps_root2]
175+ addps %3, %3, %4 ; {t8,t7,ta,t9}
176+ shufps %4, %6, %3, 0x9c ; {t1,t4,t7,ta}
177+ shufps %6, %6, %3, 0x36 ; {t3,t2,t9,t8}
178+ subps %3, %6, %4 ; {t6,t5,tc,tb}
179+ addps %6, %6, %4 ; {t1,t2,t9,ta}
180+ shufps %5, %6, %3, 0x8d ; {t2,ta,t6,tc}
181+ shufps %6, %6, %3, 0xd8 ; {t1,t9,t5,tb}
182+ subps %3, %1, %6 ; {r4,r5,r6,r7}
183+ addps %1, %1, %6 ; {r0,r1,r2,r3}
184+ subps %4, %2, %5 ; {i4,i5,i6,i7}
185+ addps %2, %2, %5 ; {i0,i1,i2,i3}
144186 %endmacro
145187
146188 ; scheduled for cpu-bound sizes
@@ -148,52 +190,44 @@ section .text align=16 · 1 unmodified line
148190 IF%1 mova m4, Z(4)
149191 IF%1 mova m5, Z(5)
150192 mova m0, %2 ; wre
151− mova m2, m4
152193 mova m1, %3 ; wim
153− mova m3, m5
154− mulps m2, m0 ; r2*wre
194+ mulps m2, m4, m0 ; r2*wre
155195 IF%1 mova m6, Z2(6)
156− mulps m3, m1 ; i2*wim
196+ mulps m3, m5, m1 ; i2*wim
157197 IF%1 mova m7, Z2(7)
158− mulps m4, m1 ; r2*wim
159− mulps m5, m0 ; i2*wre
160− addps m2, m3 ; r2*wre + i2*wim
161− mova m3, m1
162− mulps m1, m6 ; r3*wim
163− subps m5, m4 ; i2*wre - r2*wim
164− mova m4, m0
165− mulps m3, m7 ; i3*wim
166− mulps m4, m6 ; r3*wre
167− mulps m0, m7 ; i3*wre
168− subps m4, m3 ; r3*wre - i3*wim
198+ mulps m4, m4, m1 ; r2*wim
199+ mulps m5, m5, m0 ; i2*wre
200+ addps m2, m2, m3 ; r2*wre + i2*wim
201+ mulps m3, m1, m7 ; i3*wim
202+ subps m5, m5, m4 ; i2*wre - r2*wim
203+ mulps m1, m1, m6 ; r3*wim
204+ mulps m4, m0, m6 ; r3*wre
205+ mulps m0, m0, m7 ; i3*wre
206+ subps m4, m4, m3 ; r3*wre - i3*wim
169207 mova m3, Z(0)
170− addps m0, m1 ; i3*wre + r3*wim
171− mova m1, m4
172− addps m4, m2 ; t5
173− subps m1, m2 ; t3
174− subps m3, m4 ; r2
175− addps m4, Z(0) ; r0
208+ addps m0, m0, m1 ; i3*wre + r3*wim
209+ subps m1, m4, m2 ; t3
210+ addps m4, m4, m2 ; t5
211+ subps m3, m3, m4 ; r2
212+ addps m4, m4, Z(0) ; r0
176213 mova m6, Z(2)
177214 mova Z(4), m3
178215 mova Z(0), m4
179− mova m3, m5
180− subps m5, m0 ; t4
181− mova m4, m6
182− subps m6, m5 ; r3
183− addps m5, m4 ; r1
184− mova Z2(6), m6
185− mova Z(2), m5
216+ subps m3, m5, m0 ; t4
217+ subps m4, m6, m3 ; r3
218+ addps m3, m3, m6 ; r1
219+ mova Z2(6), m4
220+ mova Z(2), m3
186221 mova m2, Z(3)
187− addps m3, m0 ; t6
188− subps m2, m1 ; i3
222+ addps m3, m5, m0 ; t6
223+ subps m2, m2, m1 ; i3
189224 mova m7, Z(1)
190− addps m1, Z(3) ; i1
225+ addps m1, m1, Z(3) ; i1
191226 mova Z2(7), m2
192227 mova Z(3), m1
193− mova m4, m7
194− subps m7, m3 ; i2
195− addps m3, m4 ; i0
196− mova Z(5), m7
228+ subps m4, m7, m3 ; i2
229+ addps m3, m3, m7 ; i0
230+ mova Z(5), m4
197231 mova Z(1), m3
198232 %endmacro
199233
@@ -201,77 +235,55 @@ IF%1 mova m7, Z2(7) · 1 unmodified line
201235 %macro PASS_BIG 1 ; (!interleave)
202236 mova m4, Z(4) ; r2
203237 mova m5, Z(5) ; i2
204− mova m2, m4
205238 mova m0, [wq] ; wre
206− mova m3, m5
207239 mova m1, [wq+o1q] ; wim
208− mulps m2, m0 ; r2*wre
240+ mulps m2, m4, m0 ; r2*wre
209241 mova m6, Z2(6) ; r3
210− mulps m3, m1 ; i2*wim
242+ mulps m3, m5, m1 ; i2*wim
211243 mova m7, Z2(7) ; i3
212− mulps m4, m1 ; r2*wim
213− mulps m5, m0 ; i2*wre
214− addps m2, m3 ; r2*wre + i2*wim
215− mova m3, m1
216− mulps m1, m6 ; r3*wim
217− subps m5, m4 ; i2*wre - r2*wim
218− mova m4, m0
219− mulps m3, m7 ; i3*wim
220− mulps m4, m6 ; r3*wre
221− mulps m0, m7 ; i3*wre
222− subps m4, m3 ; r3*wre - i3*wim
244+ mulps m4, m4, m1 ; r2*wim
245+ mulps m5, m5, m0 ; i2*wre
246+ addps m2, m2, m3 ; r2*wre + i2*wim
247+ mulps m3, m1, m7 ; i3*wim
248+ mulps m1, m1, m6 ; r3*wim
249+ subps m5, m5, m4 ; i2*wre - r2*wim
250+ mulps m4, m0, m6 ; r3*wre
251+ mulps m0, m0, m7 ; i3*wre
252+ subps m4, m4, m3 ; r3*wre - i3*wim
223253 mova m3, Z(0)
224− addps m0, m1 ; i3*wre + r3*wim
225− mova m1, m4
226− addps m4, m2 ; t5
227− subps m1, m2 ; t3
228− subps m3, m4 ; r2
229− addps m4, Z(0) ; r0
254+ addps m0, m0, m1 ; i3*wre + r3*wim
255+ subps m1, m4, m2 ; t3
256+ addps m4, m4, m2 ; t5
257+ subps m3, m3, m4 ; r2
258+ addps m4, m4, Z(0) ; r0
230259 mova m6, Z(2)
231260 mova Z(4), m3
232261 mova Z(0), m4
233− mova m3, m5
234− subps m5, m0 ; t4
235− mova m4, m6
236− subps m6, m5 ; r3
237− addps m5, m4 ; r1
238−IF%1 mova Z2(6), m6
239−IF%1 mova Z(2), m5
262+ subps m3, m5, m0 ; t4
263+ subps m4, m6, m3 ; r3
264+ addps m3, m3, m6 ; r1
265+IF%1 mova Z2(6), m4
266+IF%1 mova Z(2), m3
240267 mova m2, Z(3)
241− addps m3, m0 ; t6
242− subps m2, m1 ; i3
268+ addps m5, m5, m0 ; t6
269+ subps m2, m2, m1 ; i3
243270 mova m7, Z(1)
244− addps m1, Z(3) ; i1
271+ addps m1, m1, Z(3) ; i1
245272 IF%1 mova Z2(7), m2
246273 IF%1 mova Z(3), m1
247− mova m4, m7
248− subps m7, m3 ; i2
249− addps m3, m4 ; i0
250−IF%1 mova Z(5), m7
251−IF%1 mova Z(1), m3
274+ subps m6, m7, m5 ; i2
275+ addps m5, m5, m7 ; i0
276+IF%1 mova Z(5), m6
277+IF%1 mova Z(1), m5
252278 %if %1==0
253− mova m4, m5 ; r1
254− mova m0, m6 ; r3
255− unpcklps m5, m1
256− unpckhps m4, m1
257− unpcklps m6, m2
258− unpckhps m0, m2
279+ INTERL m1, m3, m7, Z, 2
280+ INTERL m2, m4, m0, Z2, 6
281+
259282 mova m1, Z(0)
260283 mova m2, Z(4)
261− mova Z(2), m5
262− mova Z(3), m4
263− mova Z2(6), m6
264− mova Z2(7), m0
265− mova m5, m1 ; r0
266− mova m4, m2 ; r2
267− unpcklps m1, m3
268− unpckhps m5, m3
269− unpcklps m2, m7
270− unpckhps m4, m7
271− mova Z(0), m1
272− mova Z(1), m5
273− mova Z(4), m2
274− mova Z(5), m4
284+
285+ INTERL m5, m1, m3, Z, 0
286+ INTERL m6, m2, m7, Z, 4
275287 %endif
276288 %endmacro
277289
@@ -281,13 +293,106 @@ IF%1 mova Z(1), m3 · 3 unmodified lines
281293 punpckhdq %3, %2
282294 %endmacro
283295
284−INIT_XMM
285−%define mova movaps
286−
287296 %define Z(x) [r0+mmsize*x]
288297 %define Z2(x) [r0+mmsize*x]
298+%define ZH(x) [r0+mmsize*x+mmsize/2]
299+
300+INIT_YMM
301+
302+align 16
303+fft8_avx:
304+ mova m0, Z(0)
305+ mova m1, Z(1)
306+ T8_AVX m0, m1, m2, m3, m4
307+ mova Z(0), m0
308+ mova Z(1), m1
309+ ret
310+
311+
312+align 16
313+fft16_avx:
314+ mova m2, Z(2)
315+ mova m3, Z(3)
316+ T4_SSE m2, m3, m7
317+
318+ mova m0, Z(0)
319+ mova m1, Z(1)
320+ T8_AVX m0, m1, m4, m5, m7
321+
322+ mova m4, [ps_cos16_1]
323+ mova m5, [ps_cos16_2]
324+ vmulps m6, m2, m4
325+ vmulps m7, m3, m5
326+ vaddps m7, m7, m6
327+ vmulps m2, m2, m5
328+ vmulps m3, m3, m4
329+ vsubps m3, m3, m2
330+ vblendps m2, m7, m3, 0xf0
331+ vperm2f128 m3, m7, m3, 0x21
332+ vaddps m4, m2, m3
333+ vsubps m2, m3, m2
334+ vperm2f128 m2, m2, m2, 0x01
335+ vsubps m3, m1, m2
336+ vaddps m1, m1, m2
337+ vsubps m5, m0, m4
338+ vaddps m0, m0, m4
339+ vextractf128 Z(0), m0, 0
340+ vextractf128 ZH(0), m1, 0
341+ vextractf128 Z(1), m0, 1
342+ vextractf128 ZH(1), m1, 1
343+ vextractf128 Z(2), m5, 0
344+ vextractf128 ZH(2), m3, 0
345+ vextractf128 Z(3), m5, 1
346+ vextractf128 ZH(3), m3, 1
347+ ret
348+
349+align 16
350+fft32_avx:
351+ call fft16_avx
352+
353+ mova m0, Z(4)
354+ mova m1, Z(5)
355+
356+ T4_SSE m0, m1, m4
357+
358+ mova m2, Z(6)
359+ mova m3, Z(7)
360+
361+ T8_SSE m0, m1, m2, m3, m4, m6
362+ ; m0={r0,r1,r2,r3,r8, r9, r10,r11} m1={i0,i1,i2,i3,i8, i9, i10,i11}
363+ ; m2={r4,r5,r6,r7,r12,r13,r14,r15} m3={i4,i5,i6,i7,i12,i13,i14,i15}
364+
365+ vperm2f128 m4, m0, m2, 0x20
366+ vperm2f128 m5, m1, m3, 0x20
367+ vperm2f128 m6, m0, m2, 0x31
368+ vperm2f128 m7, m1, m3, 0x31
369+
370+ PASS_SMALL 0, [cos_32], [cos_32+32]
371+
372+ ret
373+
374+fft32_interleave_avx:
375+ call fft32_avx
376+ mov r2d, 32
377+.deint_loop:
378+ mova m2, Z(0)
379+ mova m3, Z(1)
380+ vunpcklps m0, m2, m3
381+ vunpckhps m1, m2, m3
382+ vextractf128 Z(0), m0, 0
383+ vextractf128 ZH(0), m1, 0
384+ vextractf128 Z(1), m0, 1
385+ vextractf128 ZH(1), m1, 1
386+ add r0, mmsize*2
387+ sub r2d, mmsize/4
388+ jg .deint_loop
389+ ret
390+
391+INIT_XMM
392+%define movdqa movaps
289393
290394 align 16
395+fft4_avx:
291396 fft4_sse:
292397 mova m0, Z(0)
293398 mova m1, Z(1)
@@ -406,6 +511,8 @@ FFT48_3DN _3dn · 112 unmodified lines
406511
407512 %define Z(x) [zq + o1q*(x&6) + mmsize*(x&1)]
408513 %define Z2(x) [zq + o3q + mmsize*(x&1)]
514+%define ZH(x) [zq + o1q*(x&6) + mmsize*(x&1) + mmsize/2]
515+%define Z2H(x) [zq + o3q + mmsize*(x&1) + mmsize/2]
409516
410517 %macro DECL_PASS 2+ ; name, payload
411518 align 16
@@ -423,8 +530,34 @@ DEFINE_ARGS z, w, n, o1, o3 · 11 unmodified lines
423530 rep ret
424531 %endmacro
425532
533+INIT_YMM
534+
535+%macro INTERL_AVX 5
536+ vunpckhps %3, %2, %1
537+ vunpcklps %2, %2, %1
538+ vextractf128 %4(%5), %2, 0
539+ vextractf128 %4 %+ H(%5), %3, 0
540+ vextractf128 %4(%5 + 1), %2, 1
541+ vextractf128 %4 %+ H(%5 + 1), %3, 1
542+%endmacro
543+
544+%define INTERL INTERL_AVX
545+
546+DECL_PASS pass_avx, PASS_BIG 1
547+DECL_PASS pass_interleave_avx, PASS_BIG 0
548+
426549 INIT_XMM
427−%define mova movaps
550+
551+%macro INTERL_SSE 5
552+ mova %3, %2
553+ unpcklps %2, %1
554+ unpckhps %3, %1
555+ mova %4(%5), %2
556+ mova %4(%5+1), %3
557+%endmacro
558+
559+%define INTERL INTERL_SSE
560+
428561 DECL_PASS pass_sse, PASS_BIG 1
429562 DECL_PASS pass_interleave_sse, PASS_BIG 0
430563
@@ -457,9 +590,12 @@ DECL_PASS pass_interleave_3dn, PASS_BIG 0 · 26 unmodified lines
457590
458591 %macro DECL_FFT 2-3 ; nbits, cpu, suffix
459592 %xdefine list_of_fft fft4%2 SECTION_REL, fft8%2 SECTION_REL
460−%if %1==5
593+%if %1>=5
461594 %xdefine list_of_fft list_of_fft, fft16%2 SECTION_REL
462595 %endif
596+%if %1>=6
597+%xdefine list_of_fft list_of_fft, fft32%3%2 SECTION_REL
598+%endif
463599
464600 %assign n 1<<%1
465601 %rep 17-%1
@@ -492,9 +628,14 @@ section .text · 26 unmodified lines
492628 ; The others pass args in registers and don't spill anything.
493629 cglobal fft_dispatch%3%2, 2,5,8, z, nbits
494630 FFT_DISPATCH %3%2, nbits
631+%ifidn %2, _avx
632+ vzeroupper
633+%endif
495634 RET
496635 %endmacro ; DECL_FFT
497636
637+DECL_FFT 6, _avx
638+DECL_FFT 6, _avx, _interleave
498639 DECL_FFT 5, _sse
499640 DECL_FFT 5, _sse, _interleave
500641 DECL_FFT 4, _3dn
@@ -533,21 +674,53 @@ INIT_XMM · 32 unmodified lines
533674 %endmacro
534675
535676 %macro CMUL 6 ;j, xmm0, xmm1, 3, 4, 5
536− movaps xmm6, [%4+%1*2]
537− movaps %2, [%4+%1*2+0x10]
538− movaps %3, xmm6
539− movaps xmm7, %2
540− mulps xmm6, [%5+%1]
541− mulps %2, [%6+%1]
542− mulps %3, [%6+%1]
543− mulps xmm7, [%5+%1]
544− subps %2, xmm6
545− addps %3, xmm7
677+ mulps m6, %3, [%5+%1]
678+ mulps m7, %2, [%5+%1]
679+ mulps %2, %2, [%6+%1]
680+ mulps %3, %3, [%6+%1]
681+ subps %2, %2, m6
682+ addps %3, %3, m7
683+%endmacro
684+
685+%macro POSROTATESHUF_AVX 5 ;j, k, z+n8, tcos+n8, tsin+n8
686+.post:
687+ vmovaps ymm1, [%3+%1*2]
688+ vmovaps ymm0, [%3+%1*2+0x20]
689+ vmovaps ymm3, [%3+%2*2]
690+ vmovaps ymm2, [%3+%2*2+0x20]
691+
692+ CMUL %1, ymm0, ymm1, %3, %4, %5
693+ CMUL %2, ymm2, ymm3, %3, %4, %5
694+ vshufps ymm1, ymm1, ymm1, 0x1b
695+ vshufps ymm3, ymm3, ymm3, 0x1b
696+ vperm2f128 ymm1, ymm1, ymm1, 0x01
697+ vperm2f128 ymm3, ymm3, ymm3, 0x01
698+ vunpcklps ymm6, ymm2, ymm1
699+ vunpckhps ymm4, ymm2, ymm1
700+ vunpcklps ymm7, ymm0, ymm3
701+ vunpckhps ymm5, ymm0, ymm3
702+
703+ vextractf128 [%3+%1*2], ymm7, 0
704+ vextractf128 [%3+%1*2+0x10], ymm5, 0
705+ vextractf128 [%3+%1*2+0x20], ymm7, 1
706+ vextractf128 [%3+%1*2+0x30], ymm5, 1
707+
708+ vextractf128 [%3+%2*2], ymm6, 0
709+ vextractf128 [%3+%2*2+0x10], ymm4, 0
710+ vextractf128 [%3+%2*2+0x20], ymm6, 1
711+ vextractf128 [%3+%2*2+0x30], ymm4, 1
712+ sub %2, 0x20
713+ add %1, 0x20
714+ jl .post
546715 %endmacro
547716
548717 %macro POSROTATESHUF 5 ;j, k, z+n8, tcos+n8, tsin+n8
549718 .post:
719+ movaps xmm1, [%3+%1*2]
720+ movaps xmm0, [%3+%1*2+0x10]
550721 CMUL %1, xmm0, xmm1, %3, %4, %5
722+ movaps xmm5, [%3+%2*2]
723+ movaps xmm4, [%3+%2*2+0x10]
551724 CMUL %2, xmm4, xmm5, %3, %4, %5
552725 shufps xmm1, xmm1, 0x1b
553726 shufps xmm5, xmm5, 0x1b
@@ -566,7 +739,8 @@ INIT_XMM · 12 unmodified lines
566739 jl .post
567740 %endmacro
568741
569−cglobal imdct_half_sse, 3,7,8; FFTContext *s, FFTSample *output, const FFTSample *input
742+%macro DECL_IMDCT 2
743+cglobal imdct_half%1, 3,7,8; FFTContext *s, FFTSample *output, const FFTSample *input
570744 %ifdef ARCH_X86_64
571745 %define rrevtab r10
572746 %define rtcos r11
@@ -641,7 +815,7 @@ cglobal imdct_half_sse, 3,7,8; FFTContext *s, FFTSample *output, const FFTSample · 68 unmodified lines
641815 mov r0, r1
642816 mov r1d, [r5+FFTContext.nbits]
643817
644− FFT_DISPATCH _sse, r1
818+ FFT_DISPATCH %1, r1
645819
646820 mov r0d, [r5+FFTContext.mdctsize]
647821 add r6, r0
@@ -653,14 +827,24 @@ cglobal imdct_half_sse, 3,7,8; FFTContext *s, FFTSample *output, const FFTSample · 5 unmodified lines
653827 mov rtsin, [esp+4]
654828 %endif
655829 neg r0
656− mov r1, -16
830+ mov r1, -mmsize
657831 sub r1, r0
658− POSROTATESHUF r0, r1, r6, rtcos, rtsin
832+ %2 r0, r1, r6, rtcos, rtsin
659833 %ifdef ARCH_X86_64
660834 pop r14
661835 pop r13
662836 pop r12
663837 %else
664838 add esp, 12
839+%endif
840+%ifidn avx_enabled, 1
841+ vzeroupper
665842 %endif
666843 RET
844+%endmacro
845+
846+DECL_IMDCT _sse, POSROTATESHUF
847+
848+INIT_YMM
849+
850+DECL_IMDCT _avx, POSROTATESHUF_AVX
libavcodec/x86/fft_sse.c+7−1
@@ -28,6 +28,12 @@ DECLARE_ASM_CONST(16, int, ff_m1m1m1m1)[4] = · 27 unmodified lines
2828
2929 void ff_fft_dispatch_sse(FFTComplex *z, int nbits);
3030 void ff_fft_dispatch_interleave_sse(FFTComplex *z, int nbits);
31+void ff_fft_dispatch_interleave_avx(FFTComplex *z, int nbits);
32+
33+void ff_fft_calc_avx(FFTContext *s, FFTComplex *z)
34+{
35+ ff_fft_dispatch_interleave_avx(z, s->nbits);
36+}
3137
3238 void ff_fft_calc_sse(FFTContext *s, FFTComplex *z)
3339 {
@@ -77,7 +83,7 @@ void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input) · 43 unmodified lines
7783 long n = s->mdct_size;
7884 long n4 = n >> 2;
7985
80− ff_imdct_half_sse(s, output+n4, input);
86+ s->imdct_half(s, output + n4, input);
8187
8288 j = -n;
8389 k = n-16;
libavcodec/x86/x86inc.asm+248−1
@@ -1,10 +1,11 @@
11 ;*****************************************************************************
22 ;* x86inc.asm
33 ;*****************************************************************************
4−;* Copyright (C) 2005-2008 x264 project
4+;* Copyright (C) 2005-2011 x264 project
55 ;*
66 ;* Authors: Loren Merritt <lorenm@u.washington.edu>
77 ;* Anton Mitrofanov <BugMaster@narod.ru>
8+;* Jason Garrett-Glaser <darkshikari@gmail.com>
89 ;*
910 ;* Permission to use, copy, modify, and/or distribute this software for any
1011 ;* purpose with or without fee is hereby granted, provided that the above
@@ -499,6 +500,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits · 488 unmodified lines
499500 %endmacro
500501
501502 %macro INIT_MMX 0
503+ %assign avx_enabled 0
502504 %define RESET_MM_PERMUTATION INIT_MMX
503505 %define mmsize 8
504506 %define num_mmregs 8
@@ -520,6 +522,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits · 15 unmodified lines
520522 %endmacro
521523
522524 %macro INIT_XMM 0
525+ %assign avx_enabled 0
523526 %define RESET_MM_PERMUTATION INIT_XMM
524527 %define mmsize 16
525528 %define num_mmregs 8
@@ -538,6 +541,31 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits · 12 unmodified lines
538541 %endrep
539542 %endmacro
540543
544+%macro INIT_AVX 0
545+ INIT_XMM
546+ %assign avx_enabled 1
547+ %define PALIGNR PALIGNR_SSSE3
548+ %define RESET_MM_PERMUTATION INIT_AVX
549+%endmacro
550+
551+%macro INIT_YMM 0
552+ %assign avx_enabled 1
553+ %define RESET_MM_PERMUTATION INIT_YMM
554+ %define mmsize 32
555+ %define num_mmregs 8
556+ %ifdef ARCH_X86_64
557+ %define num_mmregs 16
558+ %endif
559+ %define mova vmovaps
560+ %define movu vmovups
561+ %assign %%i 0
562+ %rep num_mmregs
563+ CAT_XDEFINE m, %%i, ymm %+ %%i
564+ CAT_XDEFINE nymm, %%i, %%i
565+ %assign %%i %%i+1
566+ %endrep
567+%endmacro
568+
541569 INIT_MMX
542570
543571 ; I often want to use macros that permute their arguments. e.g. there's no
@@ -645,3 +673,222 @@ INIT_MMX · 101 unmodified lines
645673 sub %1, %2
646674 %endif
647675 %endmacro
676+
677+;=============================================================================
678+; AVX abstraction layer
679+;=============================================================================
680+
681+%assign i 0
682+%rep 16
683+ %if i < 8
684+ CAT_XDEFINE sizeofmm, i, 8
685+ %endif
686+ CAT_XDEFINE sizeofxmm, i, 16
687+ CAT_XDEFINE sizeofymm, i, 32
688+%assign i i+1
689+%endrep
690+%undef i
691+
692+;%1 == instruction
693+;%2 == 1 if float, 0 if int
694+;%3 == 0 if 3-operand (xmm, xmm, xmm), 1 if 4-operand (xmm, xmm, xmm, imm)
695+;%4 == number of operands given
696+;%5+: operands
697+%macro RUN_AVX_INSTR 6-7+
698+ %if sizeof%5==32
699+ v%1 %5, %6, %7
700+ %else
701+ %if sizeof%5==8
702+ %define %%regmov movq
703+ %elif %2
704+ %define %%regmov movaps
705+ %else
706+ %define %%regmov movdqa
707+ %endif
708+
709+ %if %4>=3+%3
710+ %ifnidn %5, %6
711+ %if avx_enabled && sizeof%5==16
712+ v%1 %5, %6, %7
713+ %else
714+ %%regmov %5, %6
715+ %1 %5, %7
716+ %endif
717+ %else
718+ %1 %5, %7
719+ %endif
720+ %elif %3
721+ %1 %5, %6, %7
722+ %else
723+ %1 %5, %6
724+ %endif
725+ %endif
726+%endmacro
727+
728+;%1 == instruction
729+;%2 == 1 if float, 0 if int
730+;%3 == 0 if 3-operand (xmm, xmm, xmm), 1 if 4-operand (xmm, xmm, xmm, imm)
731+%macro AVX_INSTR 3
732+ %macro %1 2-8 fnord, fnord, fnord, %1, %2, %3
733+ %ifidn %3, fnord
734+ RUN_AVX_INSTR %6, %7, %8, 2, %1, %2
735+ %elifidn %4, fnord
736+ RUN_AVX_INSTR %6, %7, %8, 3, %1, %2, %3
737+ %elifidn %5, fnord
738+ RUN_AVX_INSTR %6, %7, %8, 4, %1, %2, %3, %4
739+ %else
740+ RUN_AVX_INSTR %6, %7, %8, 5, %1, %2, %3, %4, %5
741+ %endif
742+ %endmacro
743+%endmacro
744+
745+AVX_INSTR addpd, 1, 0
746+AVX_INSTR addps, 1, 0
747+AVX_INSTR addsd, 1, 0
748+AVX_INSTR addss, 1, 0
749+AVX_INSTR addsubpd, 1, 0
750+AVX_INSTR addsubps, 1, 0
751+AVX_INSTR andpd, 1, 0
752+AVX_INSTR andps, 1, 0
753+AVX_INSTR andnpd, 1, 0
754+AVX_INSTR andnps, 1, 0
755+AVX_INSTR blendpd, 1, 0
756+AVX_INSTR blendps, 1, 0
757+AVX_INSTR blendvpd, 1, 0
758+AVX_INSTR blendvps, 1, 0
759+AVX_INSTR cmppd, 1, 0
760+AVX_INSTR cmpps, 1, 0
761+AVX_INSTR cmpsd, 1, 0
762+AVX_INSTR cmpss, 1, 0
763+AVX_INSTR divpd, 1, 0
764+AVX_INSTR divps, 1, 0
765+AVX_INSTR divsd, 1, 0
766+AVX_INSTR divss, 1, 0
767+AVX_INSTR dppd, 1, 0
768+AVX_INSTR dpps, 1, 0
769+AVX_INSTR haddpd, 1, 0
770+AVX_INSTR haddps, 1, 0
771+AVX_INSTR hsubpd, 1, 0
772+AVX_INSTR hsubps, 1, 0
773+AVX_INSTR maxpd, 1, 0
774+AVX_INSTR maxps, 1, 0
775+AVX_INSTR maxsd, 1, 0
776+AVX_INSTR maxss, 1, 0
777+AVX_INSTR minpd, 1, 0
778+AVX_INSTR minps, 1, 0
779+AVX_INSTR minsd, 1, 0
780+AVX_INSTR minss, 1, 0
781+AVX_INSTR mpsadbw, 0, 1
782+AVX_INSTR mulpd, 1, 0
783+AVX_INSTR mulps, 1, 0
784+AVX_INSTR mulsd, 1, 0
785+AVX_INSTR mulss, 1, 0
786+AVX_INSTR orpd, 1, 0
787+AVX_INSTR orps, 1, 0
788+AVX_INSTR packsswb, 0, 0
789+AVX_INSTR packssdw, 0, 0
790+AVX_INSTR packuswb, 0, 0
791+AVX_INSTR packusdw, 0, 0
792+AVX_INSTR paddb, 0, 0
793+AVX_INSTR paddw, 0, 0
794+AVX_INSTR paddd, 0, 0
795+AVX_INSTR paddq, 0, 0
796+AVX_INSTR paddsb, 0, 0
797+AVX_INSTR paddsw, 0, 0
798+AVX_INSTR paddusb, 0, 0
799+AVX_INSTR paddusw, 0, 0
800+AVX_INSTR palignr, 0, 1
801+AVX_INSTR pand, 0, 0
802+AVX_INSTR pandn, 0, 0
803+AVX_INSTR pavgb, 0, 0
804+AVX_INSTR pavgw, 0, 0
805+AVX_INSTR pblendvb, 0, 0
806+AVX_INSTR pblendw, 0, 1
807+AVX_INSTR pcmpestri, 0, 0
808+AVX_INSTR pcmpestrm, 0, 0
809+AVX_INSTR pcmpistri, 0, 0
810+AVX_INSTR pcmpistrm, 0, 0
811+AVX_INSTR pcmpeqb, 0, 0
812+AVX_INSTR pcmpeqw, 0, 0
813+AVX_INSTR pcmpeqd, 0, 0
814+AVX_INSTR pcmpeqq, 0, 0
815+AVX_INSTR pcmpgtb, 0, 0
816+AVX_INSTR pcmpgtw, 0, 0
817+AVX_INSTR pcmpgtd, 0, 0
818+AVX_INSTR pcmpgtq, 0, 0
819+AVX_INSTR phaddw, 0, 0
820+AVX_INSTR phaddd, 0, 0
821+AVX_INSTR phaddsw, 0, 0
822+AVX_INSTR phsubw, 0, 0
823+AVX_INSTR phsubd, 0, 0
824+AVX_INSTR phsubsw, 0, 0
825+AVX_INSTR pmaddwd, 0, 0
826+AVX_INSTR pmaddubsw, 0, 0
827+AVX_INSTR pmaxsb, 0, 0
828+AVX_INSTR pmaxsw, 0, 0
829+AVX_INSTR pmaxsd, 0, 0
830+AVX_INSTR pmaxub, 0, 0
831+AVX_INSTR pmaxuw, 0, 0
832+AVX_INSTR pmaxud, 0, 0
833+AVX_INSTR pminsb, 0, 0
834+AVX_INSTR pminsw, 0, 0
835+AVX_INSTR pminsd, 0, 0
836+AVX_INSTR pminub, 0, 0
837+AVX_INSTR pminuw, 0, 0
838+AVX_INSTR pminud, 0, 0
839+AVX_INSTR pmulhuw, 0, 0
840+AVX_INSTR pmulhrsw, 0, 0
841+AVX_INSTR pmulhw, 0, 0
842+AVX_INSTR pmullw, 0, 0
843+AVX_INSTR pmulld, 0, 0
844+AVX_INSTR pmuludq, 0, 0
845+AVX_INSTR pmuldq, 0, 0
846+AVX_INSTR por, 0, 0
847+AVX_INSTR psadbw, 0, 0
848+AVX_INSTR pshufb, 0, 0
849+AVX_INSTR psignb, 0, 0
850+AVX_INSTR psignw, 0, 0
851+AVX_INSTR psignd, 0, 0
852+AVX_INSTR psllw, 0, 0
853+AVX_INSTR pslld, 0, 0
854+AVX_INSTR psllq, 0, 0
855+AVX_INSTR pslldq, 0, 0
856+AVX_INSTR psraw, 0, 0
857+AVX_INSTR psrad, 0, 0
858+AVX_INSTR psrlw, 0, 0
859+AVX_INSTR psrld, 0, 0
860+AVX_INSTR psrlq, 0, 0
861+AVX_INSTR psrldq, 0, 0
862+AVX_INSTR psubb, 0, 0
863+AVX_INSTR psubw, 0, 0
864+AVX_INSTR psubd, 0, 0
865+AVX_INSTR psubq, 0, 0
866+AVX_INSTR psubsb, 0, 0
867+AVX_INSTR psubsw, 0, 0
868+AVX_INSTR psubusb, 0, 0
869+AVX_INSTR psubusw, 0, 0
870+AVX_INSTR punpckhbw, 0, 0
871+AVX_INSTR punpckhwd, 0, 0
872+AVX_INSTR punpckhdq, 0, 0
873+AVX_INSTR punpckhqdq, 0, 0
874+AVX_INSTR punpcklbw, 0, 0
875+AVX_INSTR punpcklwd, 0, 0
876+AVX_INSTR punpckldq, 0, 0
877+AVX_INSTR punpcklqdq, 0, 0
878+AVX_INSTR pxor, 0, 0
879+AVX_INSTR shufps, 0, 1
880+AVX_INSTR subpd, 1, 0
881+AVX_INSTR subps, 1, 0
882+AVX_INSTR subsd, 1, 0
883+AVX_INSTR subss, 1, 0
884+AVX_INSTR unpckhpd, 1, 0
885+AVX_INSTR unpckhps, 1, 0
886+AVX_INSTR unpcklpd, 1, 0
887+AVX_INSTR unpcklps, 1, 0
888+AVX_INSTR xorpd, 1, 0
889+AVX_INSTR xorps, 1, 0
890+
891+; 3DNow instructions, for sharing code between AVX, SSE and 3DN
892+AVX_INSTR pfadd, 1, 0
893+AVX_INSTR pfsub, 1, 0
894+AVX_INSTR pfmul, 1, 0
libavfilter/avfilter.h+3−3
@@ -26,8 +26,8 @@ · 25 unmodified lines
2626 #include "libavutil/samplefmt.h"
2727
2828 #define LIBAVFILTER_VERSION_MAJOR 2
29−#define LIBAVFILTER_VERSION_MINOR 0
30−#define LIBAVFILTER_VERSION_MICRO 0
29+#define LIBAVFILTER_VERSION_MINOR 3
30+#define LIBAVFILTER_VERSION_MICRO 1
3131
3232 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
3333 LIBAVFILTER_VERSION_MINOR, \
@@ -115,7 +115,7 @@ typedef struct AVFilterBufferRefVideoProps { · 81 unmodified lines
115115 AVRational pixel_aspect; ///< pixel aspect ratio
116116 int interlaced; ///< is frame interlaced
117117 int top_field_first; ///< field order
118− int pict_type; ///< Picture type of the frame
118+ enum AVPictureType pict_type; ///< picture type of the frame
119119 int key_frame; ///< 1 -> keyframe, 0-> not
120120 } AVFilterBufferRefVideoProps;
121121
libavfilter/vf_scale.c+2−2
@@ -75,8 +75,8 @@ typedef struct { · 74 unmodified lines
7575 int input_is_pal; ///< set to 1 if the input format is paletted
7676 int interlaced;
7777
78− char w_expr[256]; ///< width expression string
79− char h_expr[256]; ///< height expression string
78+ char w_expr[256]; ///< width expression string
79+ char h_expr[256]; ///< height expression string
8080 } ScaleContext;
8181
8282 static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
libavfilter/vf_yadif.c+1−2
@@ -1,7 +1,6 @@
11 /*
22 * Copyright (C) 2006-2010 Michael Niedermayer <michaelni@gmx.at>
3− * 2010 James Darnley <james.darnley@gmail.com>
4− * This file is part of FFmpeg.
3+ * 2010 James Darnley <james.darnley@gmail.com>
54 *
65 * FFmpeg is free software; you can redistribute it and/or modify
76 * it under the terms of the GNU General Public License as published by
libavfilter/vsrc_buffer.c+1−1
@@ -131,7 +131,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) · 130 unmodified lines
131131 (n = sscanf(args, "%d:%d:%127[^:]:%d:%d:%d:%d", &c->w, &c->h, pix_fmt_str,
132132 &c->time_base.num, &c->time_base.den,
133133 &c->pixel_aspect.num, &c->pixel_aspect.den)) != 7) {
134− av_log(ctx, AV_LOG_ERROR, "Expected 7 arguments, but %d found in '%s'\n", n, args);
134+ av_log(ctx, AV_LOG_ERROR, "Expected 7 arguments, but only %d found in '%s'\n", n, args);
135135 return AVERROR(EINVAL);
136136 }
137137 if ((c->pix_fmt = av_get_pix_fmt(pix_fmt_str)) == PIX_FMT_NONE) {
libavformat/nutenc.c+0−2
@@ -175,7 +175,6 @@ static void build_frame_code(AVFormatContext *s){ · 174 unmodified lines
175175 }
176176
177177 key_frame= intra_only;
178−#if 1
179178 if(is_audio){
180179 int frame_bytes= codec->frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate);
181180 int pts;
@@ -199,7 +198,6 @@ static void build_frame_code(AVFormatContext *s){ · 17 unmodified lines
199198 ft->pts_delta=1;
200199 start2++;
201200 }
202−#endif
203201
204202 if(codec->has_b_frames){
205203 pred_count=5;
libavutil/avutil.h+20−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
4141
4242 #define LIBAVUTIL_VERSION_MAJOR 51
43−#define LIBAVUTIL_VERSION_MINOR 0
43+#define LIBAVUTIL_VERSION_MINOR 1
4444 #define LIBAVUTIL_VERSION_MICRO 0
4545
4646 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@@ -97,6 +97,25 @@ enum AVMediaType { · 50 unmodified lines
9797 #define AV_TIME_BASE 1000000
9898 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
9999
100+enum AVPictureType {
101+ AV_PICTURE_TYPE_I = 1, ///< Intra
102+ AV_PICTURE_TYPE_P, ///< Predicted
103+ AV_PICTURE_TYPE_B, ///< Bi-dir predicted
104+ AV_PICTURE_TYPE_S, ///< S(GMC)-VOP MPEG4
105+ AV_PICTURE_TYPE_SI, ///< Switching Intra
106+ AV_PICTURE_TYPE_SP, ///< Switching Predicted
107+ AV_PICTURE_TYPE_BI, ///< BI type
108+};
109+
110+/**
111+ * Return a single letter to describe the given picture type
112+ * pict_type.
113+ *
114+ * @param[in] pict_type the picture type @return a single character
115+ * representing the picture type, '?' if pict_type is unknown
116+ */
117+char av_get_picture_type_char(enum AVPictureType pict_type);
118+
100119 #include "common.h"
101120 #include "error.h"
102121 #include "mathematics.h"
libavutil/mem.c+7−9
@@ -69,21 +69,21 @@ void *av_malloc(size_t size) · 68 unmodified lines
6969 #endif
7070
7171 /* let's disallow possible ambiguous cases */
72− if(size > (INT_MAX-16) )
72+ if(size > (INT_MAX-32) )
7373 return NULL;
7474
7575 #if CONFIG_MEMALIGN_HACK
76− ptr = malloc(size+16);
76+ ptr = malloc(size+32);
7777 if(!ptr)
7878 return ptr;
79− diff= ((-(long)ptr - 1)&15) + 1;
79+ diff= ((-(long)ptr - 1)&31) + 1;
8080 ptr = (char*)ptr + diff;
8181 ((char*)ptr)[-1]= diff;
8282 #elif HAVE_POSIX_MEMALIGN
83− if (posix_memalign(&ptr,16,size))
83+ if (posix_memalign(&ptr,32,size))
8484 ptr = NULL;
8585 #elif HAVE_MEMALIGN
86− ptr = memalign(16,size);
86+ ptr = memalign(32,size);
8787 /* Why 64?
8888 Indeed, we should align it:
8989 on 4 for 386
@@ -93,10 +93,8 @@ void *av_malloc(size_t size) · 3 unmodified lines
9393 Because L1 and L2 caches are aligned on those values.
9494 But I don't want to code such logic here!
9595 */
96− /* Why 16?
97− Because some CPUs need alignment, for example SSE2 on P4, & most RISC CPUs
98− it will just trigger an exception and the unaligned load will be done in the
99− exception handler or it will just segfault (SSE2 on P4).
96+ /* Why 32?
97+ For AVX ASM. SSE / NEON needs only 16.
10098 Why not larger? Because I did not see a difference in benchmarks ...
10199 */
102100 /* benchmarks with P3
libavutil/pca.c+1−2
@@ -218,7 +218,6 @@ int main(void){ · 217 unmodified lines
218218 printf("\n");
219219 }
220220
221−#if 1
222221 for(i=0; i<LEN; i++){
223222 double v[LEN];
224223 double error=0;
@@ -233,7 +232,7 @@ int main(void){ · 8 unmodified lines
233232 printf("%f ", error);
234233 }
235234 printf("\n");
236−#endif
235+
237236 for(i=0; i<LEN; i++){
238237 for(j=0; j<LEN; j++){
239238 printf("%9.6f ", eigenvector[i + j*LEN]);
libavutil/utils.c+14−0
@@ -39,3 +39,17 @@ const char *avutil_license(void) · 38 unmodified lines
3939 #define LICENSE_PREFIX "libavutil license: "
4040 return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
4141 }
42+
43+char av_get_picture_type_char(enum AVPictureType pict_type)
44+{
45+ switch (pict_type) {
46+ case AV_PICTURE_TYPE_I: return 'I';
47+ case AV_PICTURE_TYPE_P: return 'P';
48+ case AV_PICTURE_TYPE_B: return 'B';
49+ case AV_PICTURE_TYPE_S: return 'S';
50+ case AV_PICTURE_TYPE_SI: return 'i';
51+ case AV_PICTURE_TYPE_SP: return 'p';
52+ case AV_PICTURE_TYPE_BI: return 'b';
53+ default: return '?';
54+ }
55+}
tests/ref/acodec/ac3_fixed+1−1
@@ -1,2 +1,2 @@
1−5ddb6d25dd117db29627f9d286153a7a *./tests/data/acodec/ac3.rm
1+0f14801e166819dd4a58981aea36e08b *./tests/data/acodec/ac3.rm
22 98751 ./tests/data/acodec/ac3.rm
tests/ref/lavf/rm+1−1
@@ -1,2 +1,2 @@
1−a1c71456f21d5459d2824d75bbdcc80c *./tests/data/lavf/lavf.rm
1+2e3d6b1944c6cd2cf14e13055aecf82a *./tests/data/lavf/lavf.rm
22 346706 ./tests/data/lavf/lavf.rm
tests/ref/seek/ac3_rm+2−1
@@ -11,7 +11,8 @@ ret:-1 st:-1 flags:1 ts: 1.470835 · 10 unmodified lines
1111 ret:-1 st: 0 flags:0 ts: 0.365000
1212 ret: 0 st: 0 flags:1 ts:-0.741000
1313 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556
14−ret:-1 st:-1 flags:0 ts: 2.153336
14+ret: 0 st:-1 flags:0 ts: 2.153336
15+ret: 0 st: 0 flags:1 dts: 2.159000 pts: 2.159000 pos: 35567 size: 556
1516 ret:-1 st:-1 flags:1 ts: 1.047503
1617 ret: 0 st: 0 flags:0 ts:-0.058000
1718 ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 271 size: 556

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