History

Merge remote-tracking branch 'qatar/master'

* qatar/master: ARM: allow runtime masking of CPU features dsputil: remove unused functions mov: Treat keyframe indexes as 1-origin if starting at non-zero. mov: Take stps entries into consideration also about key_off. Remove lowres video decoding Conflicts: ffmpeg.c ffplay.c libavcodec/arm/vp8dsp_init_arm.c libavcodec/libopenjpegdec.c libavcodec/mjpegdec.c libavcodec/mpegvideo.c libavcodec/utils.c libavformat/mov.c

Michael Niedermayer committed 14 years ago

Commit 92ef4be2 parents 2e07f42 d526c5352 files · +219 −841Browse files

Unified · Split

52 files
  1. cmdutils.c +8 −0
  2. ffplay.c +1 −3
  3. libavcodec/alpha/dsputil_alpha.c +1 −1
  4. libavcodec/arm/ac3dsp_init_arm.c +6 −2
  5. libavcodec/arm/dcadsp_init_arm.c +5 −1
  6. libavcodec/arm/dsputil_init_arm.c +7 −5
  7. libavcodec/arm/dsputil_init_armv5te.c +1 −1
  8. libavcodec/arm/dsputil_init_armv6.c +1 −1
  9. libavcodec/arm/dsputil_init_neon.c +1 −1
  10. libavcodec/arm/dsputil_init_vfp.c +4 −1
  11. libavcodec/arm/fft_fixed_init_arm.c +5 −1
  12. libavcodec/arm/fft_init_arm.c +10 −3
  13. libavcodec/arm/fmtconvert_init_arm.c +5 −2
  14. libavcodec/arm/h264dsp_init_arm.c +5 −1
  15. libavcodec/arm/h264pred_init_arm.c +5 −1
  16. libavcodec/arm/mpegaudiodsp_init_arm.c +5 −1
  17. libavcodec/arm/mpegvideo_arm.c +6 −4
  18. libavcodec/arm/sbrdsp_init_arm.c +4 −1
  19. libavcodec/arm/vp56dsp_init_arm.c +5 −1
  20. libavcodec/arm/vp8dsp_init_arm.c +5 −1
  21. libavcodec/avcodec.h +3 −3
  22. libavcodec/dsputil.c +6 −116
  23. libavcodec/dsputil.h +0 −3
  24. libavcodec/dv.c +1 −7
  25. libavcodec/dvdec.c +1 −2
  26. libavcodec/error_resilience.c +1 −1
  27. libavcodec/flvdec.c +0 −1
  28. libavcodec/h261dec.c +0 −1
  29. libavcodec/h263dec.c +1 −2
  30. libavcodec/intrax8.c +0 −1
  31. libavcodec/jrevdct.c +0 −213
  32. libavcodec/libopenjpegdec.c +1 −2
  33. libavcodec/mjpegbdec.c +0 −1
  34. libavcodec/mjpegdec.c +4 −21
  35. libavcodec/mpeg12.c +4 −7
  36. libavcodec/mpeg4videodec.c +0 −1
  37. libavcodec/mpegvideo.c +18 −407
  38. libavcodec/mpegvideo.h +1 −1
  39. libavcodec/msmpeg4.c +0 −4
  40. libavcodec/mxpegdec.c +0 −1
  41. libavcodec/options_table.h +0 −1
  42. libavcodec/ppc/dsputil_ppc.c +1 −1
  43. libavcodec/rv10.c +1 −4
  44. libavcodec/sp5xdec.c +0 −1
  45. libavcodec/utils.c +4 −4
  46. libavcodec/x86/dsputil_mmx.c +1 −1
  47. libavformat/mov.c +1 −1
  48. libavutil/arm/Makefile +1 −0
  49. libavutil/arm/cpu.c +30 −0
  50. libavutil/arm/cpu.h +32 −0
  51. libavutil/cpu.c +9 −1
  52. libavutil/cpu.h +8 −0
cmdutils.c+8−0
@@ -565,6 +565,14 @@ int opt_cpuflags(const char *opt, const char *arg) · 564 unmodified lines
565565 { "fma4" , NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_FMA4 }, .unit = "flags" },
566566 { "3dnow" , NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_3DNOW }, .unit = "flags" },
567567 { "3dnowext", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_3DNOWEXT }, .unit = "flags" },
568+
569+ { "armv5te", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV5TE }, .unit = "flags" },
570+ { "armv6", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV6 }, .unit = "flags" },
571+ { "armv6t2", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV6T2 }, .unit = "flags" },
572+ { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_VFP }, .unit = "flags" },
573+ { "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_VFPV3 }, .unit = "flags" },
574+ { "neon", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_NEON }, .unit = "flags" },
575+
568576 { NULL },
569577 };
570578 static const AVClass class = {
ffplay.c+1−3
@@ -260,7 +260,6 @@ static int64_t duration = AV_NOPTS_VALUE; · 259 unmodified lines
260260 static int workaround_bugs = 1;
261261 static int fast = 0;
262262 static int genpts = 0;
263−static int lowres = 0;
264263 static int idct = FF_IDCT_AUTO;
265264 static enum AVDiscard skip_frame = AVDISCARD_DEFAULT;
266265 static enum AVDiscard skip_idct = AVDISCARD_DEFAULT;
@@ -1325,7 +1324,7 @@ static void alloc_picture(void *opaque) · 1058 unmodified lines
13251324 /* SDL allocates a buffer smaller than requested if the video
13261325 * overlay hardware is unable to support the requested size. */
13271326 fprintf(stderr, "Error: the video system does not support an image\n"
1328− "size of %dx%d pixels. Try using -lowres or -vf \"scale=w:h\"\n"
1327+ "size of %dx%d pixels. Try using -vf \"scale=w:h\"\n"
13291328 "to reduce the image size.\n", vp->width, vp->height );
13301329 do_exit(is);
13311330 }
@@ -3085,7 +3084,6 @@ static const OptionDef options[] = { · 1753 unmodified lines
30853084 { "fast", OPT_BOOL | OPT_EXPERT, { (void*)&fast }, "non spec compliant optimizations", "" },
30863085 { "genpts", OPT_BOOL | OPT_EXPERT, { (void*)&genpts }, "generate pts", "" },
30873086 { "drp", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&decoder_reorder_pts }, "let decoder reorder pts 0=off 1=on -1=auto", ""},
3088− { "lowres", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&lowres }, "", "" },
30893087 { "skiploop", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_loop_filter }, "", "" },
30903088 { "skipframe", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_frame }, "", "" },
30913089 { "skipidct", OPT_INT | HAS_ARG | OPT_EXPERT, { (void*)&skip_idct }, "", "" },
libavcodec/alpha/dsputil_alpha.c+1−1
@@ -336,7 +336,7 @@ void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx) · 335 unmodified lines
336336 put_pixels_clamped_axp_p = c->put_pixels_clamped;
337337 add_pixels_clamped_axp_p = c->add_pixels_clamped;
338338
339− if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 &&
339+ if (avctx->bits_per_raw_sample <= 8 &&
340340 (avctx->idct_algo == FF_IDCT_AUTO ||
341341 avctx->idct_algo == FF_IDCT_SIMPLEALPHA)) {
342342 c->idct_put = ff_simple_idct_put_axp;
libavcodec/arm/ac3dsp_init_arm.c+6−2
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919 */
2020
2121 #include <stdint.h>
22+
23+#include "libavutil/arm/cpu.h"
2224 #include "libavutil/attributes.h"
2325 #include "libavcodec/ac3dsp.h"
2426 #include "config.h"
@@ -47,13 +49,15 @@ void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len); · 22 unmodified lines
4749
4850 av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
4951 {
52+ int cpu_flags = av_get_cpu_flags();
53+
5054 c->update_bap_counts = ff_ac3_update_bap_counts_arm;
5155
52− if (HAVE_ARMV6) {
56+ if (have_armv6(cpu_flags)) {
5357 c->bit_alloc_calc_bap = ff_ac3_bit_alloc_calc_bap_armv6;
5458 }
5559
56− if (HAVE_NEON) {
60+ if (have_neon(cpu_flags)) {
5761 c->ac3_exponent_min = ff_ac3_exponent_min_neon;
5862 c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_neon;
5963 c->ac3_lshift_int16 = ff_ac3_lshift_int16_neon;
libavcodec/arm/dcadsp_init_arm.c+5−1
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919 */
2020
2121 #include "config.h"
22+
23+#include "libavutil/arm/cpu.h"
2224 #include "libavutil/attributes.h"
2325 #include "libavcodec/dcadsp.h"
2426
@@ -27,6 +29,8 @@ void ff_dca_lfe_fir_neon(float *out, const float *in, const float *coefs, · 2 unmodified lines
2729
2830 av_cold void ff_dcadsp_init_arm(DCADSPContext *s)
2931 {
30− if (HAVE_NEON)
32+ int cpu_flags = av_get_cpu_flags();
33+
34+ if (have_neon(cpu_flags))
3135 s->lfe_fir = ff_dca_lfe_fir_neon;
3236 }
libavcodec/arm/dsputil_init_arm.c+7−5
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2020 */
2121
22+#include "libavutil/arm/cpu.h"
2223 #include "libavcodec/dsputil.h"
2324 #include "dsputil_arm.h"
2425
@@ -76,11 +77,12 @@ static void simple_idct_arm_add(uint8_t *dest, int line_size, DCTELEM *block) · 51 unmodified lines
7677 void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
7778 {
7879 const int high_bit_depth = avctx->bits_per_raw_sample > 8;
80+ int cpu_flags = av_get_cpu_flags();
7981
8082 ff_put_pixels_clamped = c->put_pixels_clamped;
8183 ff_add_pixels_clamped = c->add_pixels_clamped;
8284
83− if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) {
85+ if (avctx->bits_per_raw_sample <= 8) {
8486 if(avctx->idct_algo == FF_IDCT_AUTO ||
8587 avctx->idct_algo == FF_IDCT_ARM){
8688 c->idct_put = j_rev_dct_arm_put;
@@ -117,8 +119,8 @@ void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) · 30 unmodified lines
117119 c->put_no_rnd_pixels_tab[1][3] = ff_put_no_rnd_pixels8_xy2_arm;
118120 }
119121
120− if (HAVE_ARMV5TE) ff_dsputil_init_armv5te(c, avctx);
121− if (HAVE_ARMV6) ff_dsputil_init_armv6(c, avctx);
122− if (HAVE_ARMVFP) ff_dsputil_init_vfp(c, avctx);
123− if (HAVE_NEON) ff_dsputil_init_neon(c, avctx);
122+ if (have_armv5te(cpu_flags)) ff_dsputil_init_armv5te(c, avctx);
123+ if (have_armv6(cpu_flags)) ff_dsputil_init_armv6(c, avctx);
124+ if (have_vfp(cpu_flags)) ff_dsputil_init_vfp(c, avctx);
125+ if (have_neon(cpu_flags)) ff_dsputil_init_neon(c, avctx);
124126 }
libavcodec/arm/dsputil_init_armv5te.c+1−1
@@ -29,7 +29,7 @@ void ff_prefetch_arm(void *mem, int stride, int h); · 28 unmodified lines
2929
3030 av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx)
3131 {
32− if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 &&
32+ if (avctx->bits_per_raw_sample <= 8 &&
3333 (avctx->idct_algo == FF_IDCT_AUTO ||
3434 avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) {
3535 c->idct_put = ff_simple_idct_put_armv5te;
libavcodec/arm/dsputil_init_armv6.c+1−1
@@ -74,7 +74,7 @@ av_cold void ff_dsputil_init_armv6(DSPContext *c, AVCodecContext *avctx) · 73 unmodified lines
7474 {
7575 const int high_bit_depth = avctx->bits_per_raw_sample > 8;
7676
77− if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 &&
77+ if (avctx->bits_per_raw_sample <= 8 &&
7878 (avctx->idct_algo == FF_IDCT_AUTO ||
7979 avctx->idct_algo == FF_IDCT_SIMPLEARMV6)) {
8080 c->idct_put = ff_simple_idct_put_armv6;
libavcodec/arm/dsputil_init_neon.c+1−1
@@ -182,7 +182,7 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) · 181 unmodified lines
182182 {
183183 const int high_bit_depth = avctx->bits_per_raw_sample > 8;
184184
185− if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) {
185+ if (avctx->bits_per_raw_sample <= 8) {
186186 if (avctx->idct_algo == FF_IDCT_AUTO ||
187187 avctx->idct_algo == FF_IDCT_SIMPLENEON) {
188188 c->idct_put = ff_simple_idct_put_neon;
libavcodec/arm/dsputil_init_vfp.c+4−1
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919 */
2020
21+#include "libavutil/arm/cpu.h"
2122 #include "libavcodec/dsputil.h"
2223 #include "dsputil_arm.h"
2324
@@ -28,7 +29,9 @@ void ff_vector_fmul_reverse_vfp(float *dst, const float *src0, · 4 unmodified lines
2829
2930 void ff_dsputil_init_vfp(DSPContext* c, AVCodecContext *avctx)
3031 {
31− if (!HAVE_VFPV3)
32+ int cpu_flags = av_get_cpu_flags();
33+
34+ if (!have_vfpv3(cpu_flags))
3235 c->vector_fmul = ff_vector_fmul_vfp;
3336 c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp;
3437 }
libavcodec/arm/fft_fixed_init_arm.c+5−1
@@ -18,6 +18,8 @@ · 17 unmodified lines
1818 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919 */
2020
21+#include "libavutil/arm/cpu.h"
22+
2123 #define CONFIG_FFT_FLOAT 0
2224 #include "libavcodec/fft.h"
2325
@@ -27,7 +29,9 @@ void ff_mdct_fixed_calcw_neon(FFTContext *s, FFTDouble *o, const FFTSample *i); · 3 unmodified lines
2729
2830 av_cold void ff_fft_fixed_init_arm(FFTContext *s)
2931 {
30− if (HAVE_NEON) {
32+ int cpu_flags = av_get_cpu_flags();
33+
34+ if (have_neon(cpu_flags)) {
3135 s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
3236 s->fft_calc = ff_fft_fixed_calc_neon;
3337
libavcodec/arm/fft_init_arm.c+10−3
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919 */
2020
21+#include "libavutil/arm/cpu.h"
2122 #include "libavcodec/fft.h"
2223 #include "libavcodec/rdft.h"
2324 #include "libavcodec/synth_filter.h"
@@ -39,7 +40,9 @@ void ff_synth_filter_float_neon(FFTContext *imdct, · 15 unmodified lines
3940
4041 av_cold void ff_fft_init_arm(FFTContext *s)
4142 {
42− if (HAVE_NEON) {
43+ int cpu_flags = av_get_cpu_flags();
44+
45+ if (have_neon(cpu_flags)) {
4346 s->fft_permute = ff_fft_permute_neon;
4447 s->fft_calc = ff_fft_calc_neon;
4548 #if CONFIG_MDCT
@@ -54,7 +57,9 @@ av_cold void ff_fft_init_arm(FFTContext *s) · 8 unmodified lines
5457 #if CONFIG_RDFT
5558 av_cold void ff_rdft_init_arm(RDFTContext *s)
5659 {
57− if (HAVE_NEON)
60+ int cpu_flags = av_get_cpu_flags();
61+
62+ if (have_neon(cpu_flags))
5863 s->rdft_calc = ff_rdft_calc_neon;
5964 }
6065 #endif
@@ -62,7 +67,9 @@ av_cold void ff_rdft_init_arm(RDFTContext *s) · 1 unmodified line
6267 #if CONFIG_DCA_DECODER
6368 av_cold void ff_synth_filter_init_arm(SynthFilterContext *s)
6469 {
65− if (HAVE_NEON)
70+ int cpu_flags = av_get_cpu_flags();
71+
72+ if (have_neon(cpu_flags))
6673 s->synth_filter_float = ff_synth_filter_float_neon;
6774 }
6875 #endif
libavcodec/arm/fmtconvert_init_arm.c+5−2
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020
2121 #include <stdint.h>
2222
23+#include "libavutil/arm/cpu.h"
2324 #include "libavcodec/avcodec.h"
2425 #include "libavcodec/fmtconvert.h"
2526
@@ -33,11 +34,13 @@ void ff_float_to_int16_vfp(int16_t *dst, const float *src, long len); · 7 unmodified lines
3334
3435 void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
3536 {
36− if (HAVE_ARMVFP && HAVE_ARMV6) {
37+ int cpu_flags = av_get_cpu_flags();
38+
39+ if (have_vfp(cpu_flags) && have_armv6(cpu_flags)) {
3740 c->float_to_int16 = ff_float_to_int16_vfp;
3841 }
3942
40− if (HAVE_NEON) {
43+ if (have_neon(cpu_flags)) {
4144 c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;
4245
4346 if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
libavcodec/arm/h264dsp_init_arm.c+5−1
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020
2121 #include <stdint.h>
2222
23+#include "libavutil/arm/cpu.h"
2324 #include "libavcodec/dsputil.h"
2425 #include "libavcodec/h264dsp.h"
2526
@@ -99,5 +100,8 @@ static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const i · 73 unmodified lines
99100
100101 void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc)
101102 {
102− if (HAVE_NEON) ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc);
103+ int cpu_flags = av_get_cpu_flags();
104+
105+ if (have_neon(cpu_flags))
106+ ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc);
103107 }
libavcodec/arm/h264pred_init_arm.c+5−1
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020
2121 #include <stdint.h>
2222
23+#include "libavutil/arm/cpu.h"
2324 #include "libavcodec/h264pred.h"
2425
2526 void ff_pred16x16_vert_neon(uint8_t *src, int stride);
@@ -77,5 +78,8 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b · 51 unmodified lines
7778
7879 void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc)
7980 {
80− if (HAVE_NEON) ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc);
81+ int cpu_flags = av_get_cpu_flags();
82+
83+ if (have_neon(cpu_flags))
84+ ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc);
8185 }
libavcodec/arm/mpegaudiodsp_init_arm.c+5−1
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919 */
2020
2121 #include <stdint.h>
22+
23+#include "libavutil/arm/cpu.h"
2224 #include "libavcodec/mpegaudiodsp.h"
2325 #include "config.h"
2426
@@ -27,7 +29,9 @@ void ff_mpadsp_apply_window_fixed_armv6(int32_t *synth_buf, int32_t *window, · 2 unmodified lines
2729
2830 void ff_mpadsp_init_arm(MPADSPContext *s)
2931 {
30− if (HAVE_ARMV6) {
32+ int cpu_flags = av_get_cpu_flags();
33+
34+ if (have_armv6(cpu_flags)) {
3135 s->apply_window_fixed = ff_mpadsp_apply_window_fixed_armv6;
3236 }
3337 }
libavcodec/arm/mpegvideo_arm.c+6−4
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1919 */
2020
21+#include "libavutil/arm/cpu.h"
2122 #include "libavcodec/avcodec.h"
2223 #include "libavcodec/dsputil.h"
2324 #include "libavcodec/mpegvideo.h"
@@ -40,11 +41,12 @@ void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, DCTELEM *block, · 16 unmodified lines
4041
4142 void ff_MPV_common_init_arm(MpegEncContext *s)
4243 {
43−#if HAVE_ARMV5TE
44− ff_MPV_common_init_armv5te(s);
45−#endif
44+ int cpu_flags = av_get_cpu_flags();
45+
46+ if (have_armv5te(cpu_flags))
47+ ff_MPV_common_init_armv5te(s);
4648
47− if (HAVE_NEON) {
49+ if (have_neon(cpu_flags)) {
4850 s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_neon;
4951 s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_neon;
5052 }
libavcodec/arm/sbrdsp_init_arm.c+4−1
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 */
2020
2121 #include "config.h"
22+#include "libavutil/arm/cpu.h"
2223 #include "libavutil/attributes.h"
2324 #include "libavcodec/sbrdsp.h"
2425
@@ -51,7 +52,9 @@ void ff_sbr_hf_apply_noise_3_neon(float Y[64][2], const float *s_m, · 26 unmodified lines
5152
5253 av_cold void ff_sbrdsp_init_arm(SBRDSPContext *s)
5354 {
54− if (HAVE_NEON) {
55+ int cpu_flags = av_get_cpu_flags();
56+
57+ if (have_neon(cpu_flags)) {
5558 s->sum64x5 = ff_sbr_sum64x5_neon;
5659 s->sum_square = ff_sbr_sum_square_neon;
5760 s->neg_odd_64 = ff_sbr_neg_odd_64_neon;
libavcodec/arm/vp56dsp_init_arm.c+5−1
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919 */
2020
2121 #include <stdint.h>
22+
23+#include "libavutil/arm/cpu.h"
2224 #include "libavcodec/avcodec.h"
2325 #include "libavcodec/vp56dsp.h"
2426
@@ -27,7 +29,9 @@ void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t); · 2 unmodified lines
2729
2830 void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec)
2931 {
30− if (codec != CODEC_ID_VP5 && HAVE_NEON) {
32+ int cpu_flags = av_get_cpu_flags();
33+
34+ if (codec != CODEC_ID_VP5 && have_neon(cpu_flags)) {
3135 s->edge_filter_hor = ff_vp6_edge_filter_hor_neon;
3236 s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;
3337 }
libavcodec/arm/vp8dsp_init_arm.c+5−1
@@ -17,6 +17,8 @@ · 16 unmodified lines
1717 */
1818
1919 #include <stdint.h>
20+
21+#include "libavutil/arm/cpu.h"
2022 #include "libavcodec/vp8dsp.h"
2123
2224 void ff_vp8_luma_dc_wht_dc_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]);
@@ -301,7 +303,9 @@ av_cold void ff_vp8dsp_init_arm(VP8DSPContext *dsp) · 278 unmodified lines
301303 dsp->put_vp8_bilinear_pixels_tab[2][2][0] = ff_put_vp8_bilin4_v_##opt; \
302304 dsp->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_##opt; \
303305 dsp->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_##opt
304− if (HAVE_NEON) {
306+ int cpu_flags = av_get_cpu_flags();
307+
308+ if (have_neon(cpu_flags)) {
305309 set_func_ptrs(neon);
306310 } else if (HAVE_ARMV6) {
307311 set_func_ptrs(armv6);
libavcodec/avcodec.h+3−3
@@ -1451,7 +1451,7 @@ typedef struct AVCodecContext { · 1450 unmodified lines
14511451 int width, height;
14521452
14531453 /**
1454− * Bitstream width / height, may be different from width/height if lowres enabled.
1454+ * Bitstream width / height, may be different from width/height.
14551455 * - encoding: unused
14561456 * - decoding: Set by user before init if known. Codec should override / dynamically change if needed.
14571457 */
@@ -2649,7 +2649,7 @@ typedef struct AVCodecContext { · 1191 unmodified lines
26492649 * - encoding: unused
26502650 * - decoding: Set by user.
26512651 */
2652− int lowres;
2652+ attribute_deprecated int lowres;
26532653
26542654 /**
26552655 * the picture in the bitstream
@@ -2920,7 +2920,7 @@ typedef struct AVCodec { · 264 unmodified lines
29202920 const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
29212921 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
29222922 const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
2923− uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
2923+ attribute_deprecated uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
29242924 const AVClass *priv_class; ///< AVClass for the private context
29252925 const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
29262926
libavcodec/dsputil.c+6−116
@@ -381,38 +381,6 @@ void ff_put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, · 380 unmodified lines
381381 }
382382 }
383383
384−static void put_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels,
385− int line_size)
386−{
387− int i;
388−
389− /* read the pixels */
390− for(i=0;i<4;i++) {
391− pixels[0] = av_clip_uint8(block[0]);
392− pixels[1] = av_clip_uint8(block[1]);
393− pixels[2] = av_clip_uint8(block[2]);
394− pixels[3] = av_clip_uint8(block[3]);
395−
396− pixels += line_size;
397− block += 8;
398− }
399−}
400−
401−static void put_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels,
402− int line_size)
403−{
404− int i;
405−
406− /* read the pixels */
407− for(i=0;i<2;i++) {
408− pixels[0] = av_clip_uint8(block[0]);
409− pixels[1] = av_clip_uint8(block[1]);
410−
411− pixels += line_size;
412− block += 8;
413− }
414−}
415−
416384 void ff_put_signed_pixels_clamped_c(const DCTELEM *block,
417385 uint8_t *restrict pixels,
418386 int line_size)
@@ -454,36 +422,6 @@ void ff_add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, · 35 unmodified lines
454422 }
455423 }
456424
457−static void add_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels,
458− int line_size)
459−{
460− int i;
461−
462− /* read the pixels */
463− for(i=0;i<4;i++) {
464− pixels[0] = av_clip_uint8(pixels[0] + block[0]);
465− pixels[1] = av_clip_uint8(pixels[1] + block[1]);
466− pixels[2] = av_clip_uint8(pixels[2] + block[2]);
467− pixels[3] = av_clip_uint8(pixels[3] + block[3]);
468− pixels += line_size;
469− block += 8;
470− }
471−}
472−
473−static void add_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels,
474− int line_size)
475−{
476− int i;
477−
478− /* read the pixels */
479− for(i=0;i<2;i++) {
480− pixels[0] = av_clip_uint8(pixels[0] + block[0]);
481− pixels[1] = av_clip_uint8(pixels[1] + block[1]);
482− pixels += line_size;
483− block += 8;
484− }
485−}
486−
487425 static int sum_abs_dctelem_c(DCTELEM *block)
488426 {
489427 int sum=0, i;
@@ -2746,37 +2684,6 @@ static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block) · 2256 unmodified lines
27462684 ff_add_pixels_clamped_c(block, dest, line_size);
27472685 }
27482686
2749−static void ff_jref_idct4_put(uint8_t *dest, int line_size, DCTELEM *block)
2750−{
2751− ff_j_rev_dct4 (block);
2752− put_pixels_clamped4_c(block, dest, line_size);
2753−}
2754−static void ff_jref_idct4_add(uint8_t *dest, int line_size, DCTELEM *block)
2755−{
2756− ff_j_rev_dct4 (block);
2757− add_pixels_clamped4_c(block, dest, line_size);
2758−}
2759−
2760−static void ff_jref_idct2_put(uint8_t *dest, int line_size, DCTELEM *block)
2761−{
2762− ff_j_rev_dct2 (block);
2763− put_pixels_clamped2_c(block, dest, line_size);
2764−}
2765−static void ff_jref_idct2_add(uint8_t *dest, int line_size, DCTELEM *block)
2766−{
2767− ff_j_rev_dct2 (block);
2768− add_pixels_clamped2_c(block, dest, line_size);
2769−}
2770−
2771−static void ff_jref_idct1_put(uint8_t *dest, int line_size, DCTELEM *block)
2772−{
2773− dest[0] = av_clip_uint8((block[0] + 4)>>3);
2774−}
2775−static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block)
2776−{
2777− dest[0] = av_clip_uint8(dest[0] + ((block[0] + 4)>>3));
2778−}
2779−
27802687 static void just_return(void *mem av_unused, int stride av_unused, int h av_unused) { return; }
27812688
27822689 /* init static data */
@@ -2843,28 +2750,12 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) · 60 unmodified lines
28432750 }
28442751 #endif //CONFIG_ENCODERS
28452752
2846− if(avctx->lowres==1){
2847− c->idct_put= ff_jref_idct4_put;
2848− c->idct_add= ff_jref_idct4_add;
2849− c->idct = ff_j_rev_dct4;
2850− c->idct_permutation_type= FF_NO_IDCT_PERM;
2851− }else if(avctx->lowres==2){
2852− c->idct_put= ff_jref_idct2_put;
2853− c->idct_add= ff_jref_idct2_add;
2854− c->idct = ff_j_rev_dct2;
2855− c->idct_permutation_type= FF_NO_IDCT_PERM;
2856− }else if(avctx->lowres==3){
2857− c->idct_put= ff_jref_idct1_put;
2858− c->idct_add= ff_jref_idct1_add;
2859− c->idct = ff_j_rev_dct1;
2860− c->idct_permutation_type= FF_NO_IDCT_PERM;
2861− }else{
2862− if (avctx->bits_per_raw_sample == 10) {
2863− c->idct_put = ff_simple_idct_put_10;
2864− c->idct_add = ff_simple_idct_add_10;
2865− c->idct = ff_simple_idct_10;
2866− c->idct_permutation_type = FF_NO_IDCT_PERM;
2867− } else {
2753+ if (avctx->bits_per_raw_sample == 10) {
2754+ c->idct_put = ff_simple_idct_put_10;
2755+ c->idct_add = ff_simple_idct_add_10;
2756+ c->idct = ff_simple_idct_10;
2757+ c->idct_permutation_type = FF_NO_IDCT_PERM;
2758+ } else {
28682759 if(avctx->idct_algo==FF_IDCT_INT){
28692760 c->idct_put= ff_jref_idct_put;
28702761 c->idct_add= ff_jref_idct_add;
@@ -2895,7 +2786,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) · 24 unmodified lines
28952786 c->idct = ff_simple_idct_8;
28962787 c->idct_permutation_type= FF_NO_IDCT_PERM;
28972788 }
2898− }
28992789 }
29002790
29012791 c->diff_pixels = diff_pixels_c;
libavcodec/dsputil.h+0−3
@@ -46,9 +46,6 @@ void ff_fdct248_islow_8(DCTELEM *data); · 45 unmodified lines
4646 void ff_fdct248_islow_10(DCTELEM *data);
4747
4848 void ff_j_rev_dct (DCTELEM *data);
49−void ff_j_rev_dct4 (DCTELEM *data);
50−void ff_j_rev_dct2 (DCTELEM *data);
51−void ff_j_rev_dct1 (DCTELEM *data);
5249 void ff_wmv2_idct_c(DCTELEM *data);
5350
5451 void ff_fdct_mmx(DCTELEM *block);
libavcodec/dv.c+1−7
@@ -311,13 +311,7 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx) · 310 unmodified lines
311311 /* 248DCT setup */
312312 s->fdct[1] = dsp.fdct248;
313313 s->idct_put[1] = ff_simple_idct248_put; // FIXME: need to add it to DSP
314− if (avctx->lowres){
315− for (i = 0; i < 64; i++){
316− int j = ff_zigzag248_direct[i];
317− s->dv_zigzag[1][i] = dsp.idct_permutation[(j & 7) + (j & 8) * 4 + (j & 48) / 2];
318− }
319− }else
320− memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
314+ memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
321315
322316 avctx->coded_frame = &s->picture;
323317 s->avctx = avctx;
libavcodec/dvdec.c+1−2
@@ -144,7 +144,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) · 143 unmodified lines
144144 LOCAL_ALIGNED_16(DCTELEM, sblock, [5*DV_MAX_BPM], [64]);
145145 LOCAL_ALIGNED_16(uint8_t, mb_bit_buffer, [ 80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */
146146 LOCAL_ALIGNED_16(uint8_t, vs_bit_buffer, [5*80 + FF_INPUT_BUFFER_PADDING_SIZE]); /* allow some slack */
147− const int log2_blocksize = 3-s->avctx->lowres;
147+ const int log2_blocksize = 3;
148148 int is_field_mode[5];
149149
150150 assert((((int)mb_bit_buffer) & 7) == 0);
@@ -382,6 +382,5 @@ AVCodec ff_dvvideo_decoder = { · 231 unmodified lines
382382 .close = dvvideo_close,
383383 .decode = dvvideo_decode_frame,
384384 .capabilities = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS,
385− .max_lowres = 3,
386385 .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
387386 };
libavcodec/error_resilience.c+1−1
@@ -907,7 +907,7 @@ void ff_er_frame_end(MpegEncContext *s) · 906 unmodified lines
907907
908908 /* We do not support ER of field pictures yet,
909909 * though it should not crash if enabled. */
910− if (!s->err_recognition || s->error_count == 0 || s->avctx->lowres ||
910+ if (!s->err_recognition || s->error_count == 0 ||
911911 s->avctx->hwaccel ||
912912 s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ||
913913 s->picture_structure != PICT_FRAME ||
libavcodec/flvdec.c+0−1
@@ -127,7 +127,6 @@ AVCodec ff_flv_decoder = { · 126 unmodified lines
127127 .close = ff_h263_decode_end,
128128 .decode = ff_h263_decode_frame,
129129 .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
130− .max_lowres = 3,
131130 .long_name = NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"),
132131 .pix_fmts = ff_pixfmt_list_420,
133132 };
libavcodec/h261dec.c+0−1
@@ -658,6 +658,5 @@ AVCodec ff_h261_decoder = { · 657 unmodified lines
658658 .close = h261_decode_end,
659659 .decode = h261_decode_frame,
660660 .capabilities = CODEC_CAP_DR1,
661− .max_lowres = 3,
662661 .long_name = NULL_IF_CONFIG_SMALL("H.261"),
663662 };
libavcodec/h263dec.c+1−2
@@ -151,7 +151,7 @@ static int get_consumed_bytes(MpegEncContext *s, int buf_size){ · 150 unmodified lines
151151
152152 static int decode_slice(MpegEncContext *s){
153153 const int part_mask= s->partitioned_frame ? (ER_AC_END|ER_AC_ERROR) : 0x7F;
154− const int mb_size= 16>>s->avctx->lowres;
154+ const int mb_size = 16;
155155 s->last_resync_gb= s->gb;
156156 s->first_slice_line= 1;
157157
@@ -764,7 +764,6 @@ AVCodec ff_h263_decoder = { · 606 unmodified lines
764764 .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 |
765765 CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
766766 .flush = ff_mpeg_flush,
767− .max_lowres = 3,
768767 .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
769768 .pix_fmts = ff_hwaccel_pixfmt_list_420,
770769 };
libavcodec/intrax8.c+0−1
@@ -716,7 +716,6 @@ av_cold void ff_intrax8_common_end(IntraX8Context * w) · 715 unmodified lines
716716 * The parent codec must call MPV_frame_start(), ff_er_frame_start() before calling this function.
717717 * The parent codec must call ff_er_frame_end(), MPV_frame_end() after calling this function.
718718 * This function does not use MPV_decode_mb().
719− * lowres decoding is theoretically impossible.
720719 * @param w pointer to IntraX8Context
721720 * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
722721 * @param quant_offset offset away from zero
libavcodec/jrevdct.c+0−213
@@ -940,216 +940,3 @@ void ff_j_rev_dct(DCTBLOCK data) · 939 unmodified lines
940940 dataptr++; /* advance pointer to next column */
941941 }
942942 }
943−
944−#undef DCTSIZE
945−#define DCTSIZE 4
946−#define DCTSTRIDE 8
947−
948−void ff_j_rev_dct4(DCTBLOCK data)
949−{
950− int32_t tmp0, tmp1, tmp2, tmp3;
951− int32_t tmp10, tmp11, tmp12, tmp13;
952− int32_t z1;
953− int32_t d0, d2, d4, d6;
954− register DCTELEM *dataptr;
955− int rowctr;
956−
957− /* Pass 1: process rows. */
958− /* Note results are scaled up by sqrt(8) compared to a true IDCT; */
959− /* furthermore, we scale the results by 2**PASS1_BITS. */
960−
961− data[0] += 4;
962−
963− dataptr = data;
964−
965− for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) {
966− /* Due to quantization, we will usually find that many of the input
967− * coefficients are zero, especially the AC terms. We can exploit this
968− * by short-circuiting the IDCT calculation for any row in which all
969− * the AC terms are zero. In that case each output is equal to the
970− * DC coefficient (with scale factor as needed).
971− * With typical images and quantization tables, half or more of the
972− * row DCT calculations can be simplified this way.
973− */
974−
975− register int *idataptr = (int*)dataptr;
976−
977− d0 = dataptr[0];
978− d2 = dataptr[1];
979− d4 = dataptr[2];
980− d6 = dataptr[3];
981−
982− if ((d2 | d4 | d6) == 0) {
983− /* AC terms all zero */
984− if (d0) {
985− /* Compute a 32 bit value to assign. */
986− DCTELEM dcval = (DCTELEM) (d0 << PASS1_BITS);
987− register int v = (dcval & 0xffff) | ((dcval << 16) & 0xffff0000);
988−
989− idataptr[0] = v;
990− idataptr[1] = v;
991− }
992−
993− dataptr += DCTSTRIDE; /* advance pointer to next row */
994− continue;
995− }
996−
997− /* Even part: reverse the even part of the forward DCT. */
998− /* The rotator is sqrt(2)*c(-6). */
999− if (d6) {
1000− if (d2) {
1001− /* d0 != 0, d2 != 0, d4 != 0, d6 != 0 */
1002− z1 = MULTIPLY(d2 + d6, FIX_0_541196100);
1003− tmp2 = z1 + MULTIPLY(-d6, FIX_1_847759065);
1004− tmp3 = z1 + MULTIPLY(d2, FIX_0_765366865);
1005−
1006− tmp0 = (d0 + d4) << CONST_BITS;
1007− tmp1 = (d0 - d4) << CONST_BITS;
1008−
1009− tmp10 = tmp0 + tmp3;
1010− tmp13 = tmp0 - tmp3;
1011− tmp11 = tmp1 + tmp2;
1012− tmp12 = tmp1 - tmp2;
1013− } else {
1014− /* d0 != 0, d2 == 0, d4 != 0, d6 != 0 */
1015− tmp2 = MULTIPLY(-d6, FIX_1_306562965);
1016− tmp3 = MULTIPLY(d6, FIX_0_541196100);
1017−
1018− tmp0 = (d0 + d4) << CONST_BITS;
1019− tmp1 = (d0 - d4) << CONST_BITS;
1020−
1021− tmp10 = tmp0 + tmp3;
1022− tmp13 = tmp0 - tmp3;
1023− tmp11 = tmp1 + tmp2;
1024− tmp12 = tmp1 - tmp2;
1025− }
1026− } else {
1027− if (d2) {
1028− /* d0 != 0, d2 != 0, d4 != 0, d6 == 0 */
1029− tmp2 = MULTIPLY(d2, FIX_0_541196100);
1030− tmp3 = MULTIPLY(d2, FIX_1_306562965);
1031−
1032− tmp0 = (d0 + d4) << CONST_BITS;
1033− tmp1 = (d0 - d4) << CONST_BITS;
1034−
1035− tmp10 = tmp0 + tmp3;
1036− tmp13 = tmp0 - tmp3;
1037− tmp11 = tmp1 + tmp2;
1038− tmp12 = tmp1 - tmp2;
1039− } else {
1040− /* d0 != 0, d2 == 0, d4 != 0, d6 == 0 */
1041− tmp10 = tmp13 = (d0 + d4) << CONST_BITS;
1042− tmp11 = tmp12 = (d0 - d4) << CONST_BITS;
1043− }
1044− }
1045−
1046− /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
1047−
1048− dataptr[0] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS);
1049− dataptr[1] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS);
1050− dataptr[2] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS);
1051− dataptr[3] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS);
1052−
1053− dataptr += DCTSTRIDE; /* advance pointer to next row */
1054− }
1055−
1056− /* Pass 2: process columns. */
1057− /* Note that we must descale the results by a factor of 8 == 2**3, */
1058− /* and also undo the PASS1_BITS scaling. */
1059−
1060− dataptr = data;
1061− for (rowctr = DCTSIZE-1; rowctr >= 0; rowctr--) {
1062− /* Columns of zeroes can be exploited in the same way as we did with rows.
1063− * However, the row calculation has created many nonzero AC terms, so the
1064− * simplification applies less often (typically 5% to 10% of the time).
1065− * On machines with very fast multiplication, it's possible that the
1066− * test takes more time than it's worth. In that case this section
1067− * may be commented out.
1068− */
1069−
1070− d0 = dataptr[DCTSTRIDE*0];
1071− d2 = dataptr[DCTSTRIDE*1];
1072− d4 = dataptr[DCTSTRIDE*2];
1073− d6 = dataptr[DCTSTRIDE*3];
1074−
1075− /* Even part: reverse the even part of the forward DCT. */
1076− /* The rotator is sqrt(2)*c(-6). */
1077− if (d6) {
1078− if (d2) {
1079− /* d0 != 0, d2 != 0, d4 != 0, d6 != 0 */
1080− z1 = MULTIPLY(d2 + d6, FIX_0_541196100);
1081− tmp2 = z1 + MULTIPLY(-d6, FIX_1_847759065);
1082− tmp3 = z1 + MULTIPLY(d2, FIX_0_765366865);
1083−
1084− tmp0 = (d0 + d4) << CONST_BITS;
1085− tmp1 = (d0 - d4) << CONST_BITS;
1086−
1087− tmp10 = tmp0 + tmp3;
1088− tmp13 = tmp0 - tmp3;
1089− tmp11 = tmp1 + tmp2;
1090− tmp12 = tmp1 - tmp2;
1091− } else {
1092− /* d0 != 0, d2 == 0, d4 != 0, d6 != 0 */
1093− tmp2 = MULTIPLY(-d6, FIX_1_306562965);
1094− tmp3 = MULTIPLY(d6, FIX_0_541196100);
1095−
1096− tmp0 = (d0 + d4) << CONST_BITS;
1097− tmp1 = (d0 - d4) << CONST_BITS;
1098−
1099− tmp10 = tmp0 + tmp3;
1100− tmp13 = tmp0 - tmp3;
1101− tmp11 = tmp1 + tmp2;
1102− tmp12 = tmp1 - tmp2;
1103− }
1104− } else {
1105− if (d2) {
1106− /* d0 != 0, d2 != 0, d4 != 0, d6 == 0 */
1107− tmp2 = MULTIPLY(d2, FIX_0_541196100);
1108− tmp3 = MULTIPLY(d2, FIX_1_306562965);
1109−
1110− tmp0 = (d0 + d4) << CONST_BITS;
1111− tmp1 = (d0 - d4) << CONST_BITS;
1112−
1113− tmp10 = tmp0 + tmp3;
1114− tmp13 = tmp0 - tmp3;
1115− tmp11 = tmp1 + tmp2;
1116− tmp12 = tmp1 - tmp2;
1117− } else {
1118− /* d0 != 0, d2 == 0, d4 != 0, d6 == 0 */
1119− tmp10 = tmp13 = (d0 + d4) << CONST_BITS;
1120− tmp11 = tmp12 = (d0 - d4) << CONST_BITS;
1121− }
1122− }
1123−
1124− /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
1125−
1126− dataptr[DCTSTRIDE*0] = tmp10 >> (CONST_BITS+PASS1_BITS+3);
1127− dataptr[DCTSTRIDE*1] = tmp11 >> (CONST_BITS+PASS1_BITS+3);
1128− dataptr[DCTSTRIDE*2] = tmp12 >> (CONST_BITS+PASS1_BITS+3);
1129− dataptr[DCTSTRIDE*3] = tmp13 >> (CONST_BITS+PASS1_BITS+3);
1130−
1131− dataptr++; /* advance pointer to next column */
1132− }
1133−}
1134−
1135−void ff_j_rev_dct2(DCTBLOCK data){
1136− int d00, d01, d10, d11;
1137−
1138− data[0] += 4;
1139− d00 = data[0+0*DCTSTRIDE] + data[1+0*DCTSTRIDE];
1140− d01 = data[0+0*DCTSTRIDE] - data[1+0*DCTSTRIDE];
1141− d10 = data[0+1*DCTSTRIDE] + data[1+1*DCTSTRIDE];
1142− d11 = data[0+1*DCTSTRIDE] - data[1+1*DCTSTRIDE];
1143−
1144− data[0+0*DCTSTRIDE]= (d00 + d10)>>3;
1145− data[1+0*DCTSTRIDE]= (d01 + d11)>>3;
1146− data[0+1*DCTSTRIDE]= (d00 - d10)>>3;
1147− data[1+1*DCTSTRIDE]= (d01 - d11)>>3;
1148−}
1149−
1150−void ff_j_rev_dct1(DCTBLOCK data){
1151− data[0] = (data[0] + 4)>>3;
1152−}
1153−
1154−#undef FIX
1155−#undef CONST_BITS
libavcodec/libopenjpegdec.c+1−2
@@ -286,7 +286,6 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, · 285 unmodified lines
286286 }
287287
288288 ctx->dec_params.cp_limit_decoding = NO_LIMITATION;
289− ctx->dec_params.cp_reduce = avctx->lowres;
290289 // Tie decoder with decoding parameters
291290 opj_setup_decoder(dec, &ctx->dec_params);
292291 stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size);
@@ -369,6 +368,6 @@ AVCodec ff_libopenjpeg_decoder = { · 76 unmodified lines
369368 .decode = libopenjpeg_decode_frame,
370369 .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
371370 .max_lowres = 5,
372− .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
371+ .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
373372 .init_thread_copy = ONLY_IF_THREADS_ENABLED(libopenjpeg_decode_init_thread_copy),
374373 };
libavcodec/mjpegbdec.c+0−1
@@ -161,6 +161,5 @@ AVCodec ff_mjpegb_decoder = { · 160 unmodified lines
161161 .close = ff_mjpeg_decode_end,
162162 .decode = mjpegb_decode_frame,
163163 .capabilities = CODEC_CAP_DR1,
164− .max_lowres = 3,
165164 .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
166165 };
libavcodec/mjpegdec.c+4−21
@@ -941,21 +941,6 @@ static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor, · 940 unmodified lines
941941 return 0;
942942 }
943943
944−static av_always_inline void mjpeg_copy_block(uint8_t *dst, const uint8_t *src,
945− int linesize, int lowres)
946−{
947− switch (lowres) {
948− case 0: copy_block8(dst, src, linesize, linesize, 8);
949− break;
950− case 1: copy_block4(dst, src, linesize, linesize, 4);
951− break;
952− case 2: copy_block2(dst, src, linesize, linesize, 2);
953− break;
954− case 3: *dst = *src;
955− break;
956− }
957−}
958−
959944 static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
960945 int Al, const uint8_t *mb_bitmask,
961946 const AVFrame *reference)
@@ -1018,16 +1003,16 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, · 56 unmodified lines
10181003 x = 0;
10191004 y = 0;
10201005 for (j = 0; j < n; j++) {
1021− block_offset = (((linesize[c] * (v * mb_y + y) * 8) +
1022− (h * mb_x + x) * 8) >> s->avctx->lowres);
1006+ block_offset = ((linesize[c] * (v * mb_y + y) * 8) +
1007+ (h * mb_x + x) * 8);
10231008
10241009 if (s->interlaced && s->bottom_field)
10251010 block_offset += linesize[c] >> 1;
10261011 ptr = data[c] + block_offset;
10271012 if (!s->progressive) {
10281013 if (copy_mb)
1029− mjpeg_copy_block(ptr, reference_data[c] + block_offset,
1030− linesize[c], s->avctx->lowres);
1014+ copy_block8(ptr, reference_data[c] + block_offset,
1015+ linesize[c], linesize[c], 8);
10311016 else {
10321017 s->dsp.clear_block(s->block);
10331018 if (decode_block(s, s->block, i,
@@ -1829,7 +1814,6 @@ AVCodec ff_mjpeg_decoder = { · 795 unmodified lines
18291814 .close = ff_mjpeg_decode_end,
18301815 .decode = ff_mjpeg_decode_frame,
18311816 .capabilities = CODEC_CAP_DR1,
1832− .max_lowres = 3,
18331817 .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
18341818 .priv_class = &mjpegdec_class,
18351819 };
@@ -1843,6 +1827,5 @@ AVCodec ff_thp_decoder = { · 7 unmodified lines
18431827 .close = ff_mjpeg_decode_end,
18441828 .decode = ff_mjpeg_decode_frame,
18451829 .capabilities = CODEC_CAP_DR1,
1846− .max_lowres = 3,
18471830 .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"),
18481831 };
libavcodec/mpeg12.c+4−7
@@ -1676,7 +1676,6 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, · 1675 unmodified lines
16761676 const uint8_t **buf, int buf_size)
16771677 {
16781678 AVCodecContext *avctx = s->avctx;
1679− const int lowres = s->avctx->lowres;
16801679 const int field_pic = s->picture_structure != PICT_FRAME;
16811680
16821681 s->resync_mb_x =
@@ -1797,14 +1796,14 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, · 114 unmodified lines
17971796 }
17981797 }
17991798
1800− s->dest[0] += 16 >> lowres;
1801− s->dest[1] +=(16 >> lowres) >> s->chroma_x_shift;
1802− s->dest[2] +=(16 >> lowres) >> s->chroma_x_shift;
1799+ s->dest[0] += 16;
1800+ s->dest[1] += 16 >> s->chroma_x_shift;
1801+ s->dest[2] += 16 >> s->chroma_x_shift;
18031802
18041803 ff_MPV_decode_mb(s, s->block);
18051804
18061805 if (++s->mb_x >= s->mb_width) {
1807− const int mb_size = 16 >> s->avctx->lowres;
1806+ const int mb_size = 16;
18081807
18091808 ff_draw_horiz_band(s, mb_size*(s->mb_y >> field_pic), mb_size);
18101809 ff_MPV_report_decode_progress(s);
@@ -2579,7 +2578,6 @@ AVCodec ff_mpeg1video_decoder = { · 768 unmodified lines
25792578 CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY |
25802579 CODEC_CAP_SLICE_THREADS,
25812580 .flush = flush,
2582− .max_lowres = 3,
25832581 .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
25842582 .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context)
25852583 };
@@ -2596,7 +2594,6 @@ AVCodec ff_mpeg2video_decoder = { · 10 unmodified lines
25962594 CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY |
25972595 CODEC_CAP_SLICE_THREADS,
25982596 .flush = flush,
2599− .max_lowres = 3,
26002597 .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"),
26012598 .profiles = NULL_IF_CONFIG_SMALL(mpeg2_video_profiles),
26022599 };
libavcodec/mpeg4videodec.c+0−1
@@ -2327,7 +2327,6 @@ AVCodec ff_mpeg4_decoder = { · 2326 unmodified lines
23272327 CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY |
23282328 CODEC_CAP_FRAME_THREADS,
23292329 .flush = ff_mpeg_flush,
2330− .max_lowres = 3,
23312330 .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
23322331 .pix_fmts = ff_hwaccel_pixfmt_list_420,
23332332 .profiles = NULL_IF_CONFIG_SMALL(mpeg4_video_profiles),
libavcodec/mpegvideo.c+18−407
@@ -1784,381 +1784,6 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) · 1783 unmodified lines
17841784 }
17851785 }
17861786
1787−static inline int hpel_motion_lowres(MpegEncContext *s,
1788− uint8_t *dest, uint8_t *src,
1789− int field_based, int field_select,
1790− int src_x, int src_y,
1791− int width, int height, int stride,
1792− int h_edge_pos, int v_edge_pos,
1793− int w, int h, h264_chroma_mc_func *pix_op,
1794− int motion_x, int motion_y)
1795−{
1796− const int lowres = s->avctx->lowres;
1797− const int op_index = FFMIN(lowres, 2);
1798− const int s_mask = (2 << lowres) - 1;
1799− int emu = 0;
1800− int sx, sy;
1801−
1802− if (s->quarter_sample) {
1803− motion_x /= 2;
1804− motion_y /= 2;
1805− }
1806−
1807− sx = motion_x & s_mask;
1808− sy = motion_y & s_mask;
1809− src_x += motion_x >> lowres + 1;
1810− src_y += motion_y >> lowres + 1;
1811−
1812− src += src_y * stride + src_x;
1813−
1814− if ((unsigned)src_x > FFMAX( h_edge_pos - (!!sx) - w, 0) ||
1815− (unsigned)src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - h, 0)) {
1816− s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, w + 1,
1817− (h + 1) << field_based, src_x,
1818− src_y << field_based,
1819− h_edge_pos,
1820− v_edge_pos);
1821− src = s->edge_emu_buffer;
1822− emu = 1;
1823− }
1824−
1825− sx = (sx << 2) >> lowres;
1826− sy = (sy << 2) >> lowres;
1827− if (field_select)
1828− src += s->linesize;
1829− pix_op[op_index](dest, src, stride, h, sx, sy);
1830− return emu;
1831−}
1832−
1833−/* apply one mpeg motion vector to the three components */
1834−static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
1835− uint8_t *dest_y,
1836− uint8_t *dest_cb,
1837− uint8_t *dest_cr,
1838− int field_based,
1839− int bottom_field,
1840− int field_select,
1841− uint8_t **ref_picture,
1842− h264_chroma_mc_func *pix_op,
1843− int motion_x, int motion_y,
1844− int h, int mb_y)
1845−{
1846− uint8_t *ptr_y, *ptr_cb, *ptr_cr;
1847− int mx, my, src_x, src_y, uvsrc_x, uvsrc_y, uvlinesize, linesize, sx, sy,
1848− uvsx, uvsy;
1849− const int lowres = s->avctx->lowres;
1850− const int op_index = FFMIN(lowres-1+s->chroma_x_shift, 2);
1851− const int block_s = 8>>lowres;
1852− const int s_mask = (2 << lowres) - 1;
1853− const int h_edge_pos = s->h_edge_pos >> lowres;
1854− const int v_edge_pos = s->v_edge_pos >> lowres;
1855− linesize = s->current_picture.f.linesize[0] << field_based;
1856− uvlinesize = s->current_picture.f.linesize[1] << field_based;
1857−
1858− // FIXME obviously not perfect but qpel will not work in lowres anyway
1859− if (s->quarter_sample) {
1860− motion_x /= 2;
1861− motion_y /= 2;
1862− }
1863−
1864− if(field_based){
1865− motion_y += (bottom_field - field_select)*((1 << lowres)-1);
1866− }
1867−
1868− sx = motion_x & s_mask;
1869− sy = motion_y & s_mask;
1870− src_x = s->mb_x * 2 * block_s + (motion_x >> lowres + 1);
1871− src_y = (mb_y * 2 * block_s >> field_based) + (motion_y >> lowres + 1);
1872−
1873− if (s->out_format == FMT_H263) {
1874− uvsx = ((motion_x >> 1) & s_mask) | (sx & 1);
1875− uvsy = ((motion_y >> 1) & s_mask) | (sy & 1);
1876− uvsrc_x = src_x >> 1;
1877− uvsrc_y = src_y >> 1;
1878− } else if (s->out_format == FMT_H261) {
1879− // even chroma mv's are full pel in H261
1880− mx = motion_x / 4;
1881− my = motion_y / 4;
1882− uvsx = (2 * mx) & s_mask;
1883− uvsy = (2 * my) & s_mask;
1884− uvsrc_x = s->mb_x * block_s + (mx >> lowres);
1885− uvsrc_y = mb_y * block_s + (my >> lowres);
1886− } else {
1887− if(s->chroma_y_shift){
1888− mx = motion_x / 2;
1889− my = motion_y / 2;
1890− uvsx = mx & s_mask;
1891− uvsy = my & s_mask;
1892− uvsrc_x = s->mb_x * block_s + (mx >> lowres + 1);
1893− uvsrc_y = (mb_y * block_s >> field_based) + (my >> lowres + 1);
1894− } else {
1895− if(s->chroma_x_shift){
1896− //Chroma422
1897− mx = motion_x / 2;
1898− uvsx = mx & s_mask;
1899− uvsy = motion_y & s_mask;
1900− uvsrc_y = src_y;
1901− uvsrc_x = s->mb_x*block_s + (mx >> (lowres+1));
1902− } else {
1903− //Chroma444
1904− uvsx = motion_x & s_mask;
1905− uvsy = motion_y & s_mask;
1906− uvsrc_x = src_x;
1907− uvsrc_y = src_y;
1908− }
1909− }
1910− }
1911−
1912− ptr_y = ref_picture[0] + src_y * linesize + src_x;
1913− ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x;
1914− ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
1915−
1916− if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) ||
1917− (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - h, 0)) {
1918− s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y,
1919− s->linesize, 17, 17 + field_based,
1920− src_x, src_y << field_based, h_edge_pos,
1921− v_edge_pos);
1922− ptr_y = s->edge_emu_buffer;
1923− if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
1924− uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize;
1925− s->dsp.emulated_edge_mc(uvbuf , ptr_cb, s->uvlinesize, 9,
1926− 9 + field_based,
1927− uvsrc_x, uvsrc_y << field_based,
1928− h_edge_pos >> 1, v_edge_pos >> 1);
1929− s->dsp.emulated_edge_mc(uvbuf + 16, ptr_cr, s->uvlinesize, 9,
1930− 9 + field_based,
1931− uvsrc_x, uvsrc_y << field_based,
1932− h_edge_pos >> 1, v_edge_pos >> 1);
1933− ptr_cb = uvbuf;
1934− ptr_cr = uvbuf + 16;
1935− }
1936− }
1937−
1938− // FIXME use this for field pix too instead of the obnoxious hack which changes picture.f.data
1939− if (bottom_field) {
1940− dest_y += s->linesize;
1941− dest_cb += s->uvlinesize;
1942− dest_cr += s->uvlinesize;
1943− }
1944−
1945− if (field_select) {
1946− ptr_y += s->linesize;
1947− ptr_cb += s->uvlinesize;
1948− ptr_cr += s->uvlinesize;
1949− }
1950−
1951− sx = (sx << 2) >> lowres;
1952− sy = (sy << 2) >> lowres;
1953− pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
1954−
1955− if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
1956− uvsx = (uvsx << 2) >> lowres;
1957− uvsy = (uvsy << 2) >> lowres;
1958− if (h >> s->chroma_y_shift) {
1959− pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
1960− pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
1961− }
1962− }
1963− // FIXME h261 lowres loop filter
1964−}
1965−
1966−static inline void chroma_4mv_motion_lowres(MpegEncContext *s,
1967− uint8_t *dest_cb, uint8_t *dest_cr,
1968− uint8_t **ref_picture,
1969− h264_chroma_mc_func * pix_op,
1970− int mx, int my)
1971−{
1972− const int lowres = s->avctx->lowres;
1973− const int op_index = FFMIN(lowres, 2);
1974− const int block_s = 8 >> lowres;
1975− const int s_mask = (2 << lowres) - 1;
1976− const int h_edge_pos = s->h_edge_pos >> lowres + 1;
1977− const int v_edge_pos = s->v_edge_pos >> lowres + 1;
1978− int emu = 0, src_x, src_y, offset, sx, sy;
1979− uint8_t *ptr;
1980−
1981− if (s->quarter_sample) {
1982− mx /= 2;
1983− my /= 2;
1984− }
1985−
1986− /* In case of 8X8, we construct a single chroma motion vector
1987− with a special rounding */
1988− mx = ff_h263_round_chroma(mx);
1989− my = ff_h263_round_chroma(my);
1990−
1991− sx = mx & s_mask;
1992− sy = my & s_mask;
1993− src_x = s->mb_x * block_s + (mx >> lowres + 1);
1994− src_y = s->mb_y * block_s + (my >> lowres + 1);
1995−
1996− offset = src_y * s->uvlinesize + src_x;
1997− ptr = ref_picture[1] + offset;
1998− if (s->flags & CODEC_FLAG_EMU_EDGE) {
1999− if ((unsigned) src_x > FFMAX(h_edge_pos - (!!sx) - block_s, 0) ||
2000− (unsigned) src_y > FFMAX(v_edge_pos - (!!sy) - block_s, 0)) {
2001− s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize,
2002− 9, 9, src_x, src_y, h_edge_pos, v_edge_pos);
2003− ptr = s->edge_emu_buffer;
2004− emu = 1;
2005− }
2006− }
2007− sx = (sx << 2) >> lowres;
2008− sy = (sy << 2) >> lowres;
2009− pix_op[op_index](dest_cb, ptr, s->uvlinesize, block_s, sx, sy);
2010−
2011− ptr = ref_picture[2] + offset;
2012− if (emu) {
2013− s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9,
2014− src_x, src_y, h_edge_pos, v_edge_pos);
2015− ptr = s->edge_emu_buffer;
2016− }
2017− pix_op[op_index](dest_cr, ptr, s->uvlinesize, block_s, sx, sy);
2018−}
2019−
2020−/**
2021− * motion compensation of a single macroblock
2022− * @param s context
2023− * @param dest_y luma destination pointer
2024− * @param dest_cb chroma cb/u destination pointer
2025− * @param dest_cr chroma cr/v destination pointer
2026− * @param dir direction (0->forward, 1->backward)
2027− * @param ref_picture array[3] of pointers to the 3 planes of the reference picture
2028− * @param pix_op halfpel motion compensation function (average or put normally)
2029− * the motion vectors are taken from s->mv and the MV type from s->mv_type
2030− */
2031−static inline void MPV_motion_lowres(MpegEncContext *s,
2032− uint8_t *dest_y, uint8_t *dest_cb,
2033− uint8_t *dest_cr,
2034− int dir, uint8_t **ref_picture,
2035− h264_chroma_mc_func *pix_op)
2036−{
2037− int mx, my;
2038− int mb_x, mb_y, i;
2039− const int lowres = s->avctx->lowres;
2040− const int block_s = 8 >>lowres;
2041−
2042− mb_x = s->mb_x;
2043− mb_y = s->mb_y;
2044−
2045− switch (s->mv_type) {
2046− case MV_TYPE_16X16:
2047− mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
2048− 0, 0, 0,
2049− ref_picture, pix_op,
2050− s->mv[dir][0][0], s->mv[dir][0][1],
2051− 2 * block_s, mb_y);
2052− break;
2053− case MV_TYPE_8X8:
2054− mx = 0;
2055− my = 0;
2056− for (i = 0; i < 4; i++) {
2057− hpel_motion_lowres(s, dest_y + ((i & 1) + (i >> 1) *
2058− s->linesize) * block_s,
2059− ref_picture[0], 0, 0,
2060− (2 * mb_x + (i & 1)) * block_s,
2061− (2 * mb_y + (i >> 1)) * block_s,
2062− s->width, s->height, s->linesize,
2063− s->h_edge_pos >> lowres, s->v_edge_pos >> lowres,
2064− block_s, block_s, pix_op,
2065− s->mv[dir][i][0], s->mv[dir][i][1]);
2066−
2067− mx += s->mv[dir][i][0];
2068− my += s->mv[dir][i][1];
2069− }
2070−
2071− if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY))
2072− chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture,
2073− pix_op, mx, my);
2074− break;
2075− case MV_TYPE_FIELD:
2076− if (s->picture_structure == PICT_FRAME) {
2077− /* top field */
2078− mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
2079− 1, 0, s->field_select[dir][0],
2080− ref_picture, pix_op,
2081− s->mv[dir][0][0], s->mv[dir][0][1],
2082− block_s, mb_y);
2083− /* bottom field */
2084− mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
2085− 1, 1, s->field_select[dir][1],
2086− ref_picture, pix_op,
2087− s->mv[dir][1][0], s->mv[dir][1][1],
2088− block_s, mb_y);
2089− } else {
2090− if (s->picture_structure != s->field_select[dir][0] + 1 &&
2091− s->pict_type != AV_PICTURE_TYPE_B && !s->first_field) {
2092− ref_picture = s->current_picture_ptr->f.data;
2093−
2094− }
2095− mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
2096− 0, 0, s->field_select[dir][0],
2097− ref_picture, pix_op,
2098− s->mv[dir][0][0],
2099− s->mv[dir][0][1], 2 * block_s, mb_y >> 1);
2100− }
2101− break;
2102− case MV_TYPE_16X8:
2103− for (i = 0; i < 2; i++) {
2104− uint8_t **ref2picture;
2105−
2106− if (s->picture_structure == s->field_select[dir][i] + 1 ||
2107− s->pict_type == AV_PICTURE_TYPE_B || s->first_field) {
2108− ref2picture = ref_picture;
2109− } else {
2110− ref2picture = s->current_picture_ptr->f.data;
2111− }
2112−
2113− mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
2114− 0, 0, s->field_select[dir][i],
2115− ref2picture, pix_op,
2116− s->mv[dir][i][0], s->mv[dir][i][1] +
2117− 2 * block_s * i, block_s, mb_y >> 1);
2118−
2119− dest_y += 2 * block_s * s->linesize;
2120− dest_cb += (2 * block_s >> s->chroma_y_shift) * s->uvlinesize;
2121− dest_cr += (2 * block_s >> s->chroma_y_shift) * s->uvlinesize;
2122− }
2123− break;
2124− case MV_TYPE_DMV:
2125− if (s->picture_structure == PICT_FRAME) {
2126− for (i = 0; i < 2; i++) {
2127− int j;
2128− for (j = 0; j < 2; j++) {
2129− mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
2130− 1, j, j ^ i,
2131− ref_picture, pix_op,
2132− s->mv[dir][2 * i + j][0],
2133− s->mv[dir][2 * i + j][1],
2134− block_s, mb_y);
2135− }
2136− pix_op = s->dsp.avg_h264_chroma_pixels_tab;
2137− }
2138− } else {
2139− for (i = 0; i < 2; i++) {
2140− mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
2141− 0, 0, s->picture_structure != i + 1,
2142− ref_picture, pix_op,
2143− s->mv[dir][2 * i][0],s->mv[dir][2 * i][1],
2144− 2 * block_s, mb_y >> 1);
2145−
2146− // after put we make avg of the same block
2147− pix_op = s->dsp.avg_h264_chroma_pixels_tab;
2148−
2149− // opposite parity is always in the same
2150− // frame if this is second field
2151− if (!s->first_field) {
2152− ref_picture = s->current_picture_ptr->f.data;
2153− }
2154− }
2155− }
2156− break;
2157− default:
2158− assert(0);
2159− }
2160−}
2161−
21621787 /**
21631788 * find the lowest MB row referenced in the MVs
21641789 */
@@ -2268,7 +1893,7 @@ void ff_clean_intra_table_entries(MpegEncContext *s) · 103 unmodified lines
22681893 */
22691894 static av_always_inline
22701895 void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
2271− int lowres_flag, int is_mpeg12)
1896+ int is_mpeg12)
22721897 {
22731898 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
22741899 if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){
@@ -2313,8 +1938,8 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 38 unmodified lines
23131938 qpel_mc_func (*op_qpix)[16];
23141939 const int linesize = s->current_picture.f.linesize[0]; //not s->linesize as this would be wrong for field pics
23151940 const int uvlinesize = s->current_picture.f.linesize[1];
2316− const int readable= s->pict_type != AV_PICTURE_TYPE_B || s->encoding || s->avctx->draw_horiz_band || lowres_flag;
2317− const int block_size= lowres_flag ? 8>>s->avctx->lowres : 8;
1941+ const int readable= s->pict_type != AV_PICTURE_TYPE_B || s->encoding || s->avctx->draw_horiz_band;
1942+ const int block_size = 8;
23181943
23191944 /* avoid copy if macroblock skipped in last frame too */
23201945 /* skip only during decoding as we might trash the buffers during encoding a bit */
@@ -2363,31 +1988,19 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], · 42 unmodified lines
23631988 }
23641989 }
23651990
2366− if(lowres_flag){
2367− h264_chroma_mc_func *op_pix = s->dsp.put_h264_chroma_pixels_tab;
2368−
2369− if (s->mv_dir & MV_DIR_FORWARD) {
2370− MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f.data, op_pix);
2371− op_pix = s->dsp.avg_h264_chroma_pixels_tab;
2372− }
2373− if (s->mv_dir & MV_DIR_BACKWARD) {
2374− MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f.data, op_pix);
2375− }
1991+ op_qpix= s->me.qpel_put;
1992+ if ((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){
1993+ op_pix = s->dsp.put_pixels_tab;
23761994 }else{
2377− op_qpix= s->me.qpel_put;
2378− if ((!s->no_rounding) || s->pict_type==AV_PICTURE_TYPE_B){
2379− op_pix = s->dsp.put_pixels_tab;
2380− }else{
2381− op_pix = s->dsp.put_no_rnd_pixels_tab;
2382− }
2383− if (s->mv_dir & MV_DIR_FORWARD) {
2384− MPV_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f.data, op_pix, op_qpix);
2385− op_pix = s->dsp.avg_pixels_tab;
2386− op_qpix= s->me.qpel_avg;
2387− }
2388− if (s->mv_dir & MV_DIR_BACKWARD) {
2389− MPV_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f.data, op_pix, op_qpix);
2390− }
1995+ op_pix = s->dsp.put_no_rnd_pixels_tab;
1996+ }
1997+ if (s->mv_dir & MV_DIR_FORWARD) {
1998+ MPV_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f.data, op_pix, op_qpix);
1999+ op_pix = s->dsp.avg_pixels_tab;
2000+ op_qpix= s->me.qpel_avg;
2001+ }
2002+ if (s->mv_dir & MV_DIR_BACKWARD) {
2003+ MPV_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f.data, op_pix, op_qpix);
23912004 }
23922005 }
23932006
@@ -2513,12 +2126,10 @@ skip_idct: · 119 unmodified lines
25132126 void ff_MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){
25142127 #if !CONFIG_SMALL
25152128 if(s->out_format == FMT_MPEG1) {
2516− if(s->avctx->lowres) MPV_decode_mb_internal(s, block, 1, 1);
2517− else MPV_decode_mb_internal(s, block, 0, 1);
2129+ MPV_decode_mb_internal(s, block, 1);
25182130 } else
25192131 #endif
2520− if(s->avctx->lowres) MPV_decode_mb_internal(s, block, 1, 0);
2521− else MPV_decode_mb_internal(s, block, 0, 0);
2132+ MPV_decode_mb_internal(s, block, 0);
25222133 }
25232134
25242135 /**
@@ -2593,7 +2204,7 @@ void ff_draw_horiz_band(MpegEncContext *s, int y, int h){ · 68 unmodified lines
25932204 void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename
25942205 const int linesize = s->current_picture.f.linesize[0]; //not s->linesize as this would be wrong for field pics
25952206 const int uvlinesize = s->current_picture.f.linesize[1];
2596− const int mb_size= 4 - s->avctx->lowres;
2207+ const int mb_size= 4;
25972208
25982209 s->block_index[0]= s->b8_stride*(s->mb_y*2 ) - 2 + s->mb_x*2;
25992210 s->block_index[1]= s->b8_stride*(s->mb_y*2 ) - 1 + s->mb_x*2;
libavcodec/mpegvideo.h+1−1
@@ -793,7 +793,7 @@ extern const enum PixelFormat ff_pixfmt_list_420[]; · 792 unmodified lines
793793 extern const enum PixelFormat ff_hwaccel_pixfmt_list_420[];
794794
795795 static inline void ff_update_block_index(MpegEncContext *s){
796− const int block_size= 8>>s->avctx->lowres;
796+ const int block_size = 8;
797797
798798 s->block_index[0]+=2;
799799 s->block_index[1]+=2;
libavcodec/msmpeg4.c+0−4
@@ -1216,7 +1216,6 @@ AVCodec ff_msmpeg4v1_decoder = { · 1215 unmodified lines
12161216 .close = ff_h263_decode_end,
12171217 .decode = ff_h263_decode_frame,
12181218 .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1219− .max_lowres = 3,
12201219 .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
12211220 .pix_fmts = ff_pixfmt_list_420,
12221221 };
@@ -1230,7 +1229,6 @@ AVCodec ff_msmpeg4v2_decoder = { · 7 unmodified lines
12301229 .close = ff_h263_decode_end,
12311230 .decode = ff_h263_decode_frame,
12321231 .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1233− .max_lowres = 3,
12341232 .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
12351233 .pix_fmts = ff_pixfmt_list_420,
12361234 };
@@ -1244,7 +1242,6 @@ AVCodec ff_msmpeg4v3_decoder = { · 7 unmodified lines
12441242 .close = ff_h263_decode_end,
12451243 .decode = ff_h263_decode_frame,
12461244 .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1247− .max_lowres = 3,
12481245 .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
12491246 .pix_fmts = ff_pixfmt_list_420,
12501247 };
@@ -1258,7 +1255,6 @@ AVCodec ff_wmv1_decoder = { · 7 unmodified lines
12581255 .close = ff_h263_decode_end,
12591256 .decode = ff_h263_decode_frame,
12601257 .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
1261− .max_lowres = 3,
12621258 .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
12631259 .pix_fmts = ff_pixfmt_list_420,
12641260 };
libavcodec/mxpegdec.c+0−1
@@ -339,5 +339,4 @@ AVCodec ff_mxpeg_decoder = { · 338 unmodified lines
339339 .close = mxpeg_decode_end,
340340 .decode = mxpeg_decode_frame,
341341 .capabilities = CODEC_CAP_DR1,
342− .max_lowres = 3,
343342 };
libavcodec/options_table.h+0−1
@@ -326,7 +326,6 @@ static const AVOption options[]={ · 325 unmodified lines
326326 {"dts_hd_ma", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_PROFILE_DTS_HD_MA }, INT_MIN, INT_MAX, A|E, "profile"},
327327 {"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.dbl = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"},
328328 {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"},
329−{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, V|A|D},
330329 {"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
331330 {"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
332331 {"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX, V|E},
libavcodec/ppc/dsputil_ppc.c+1−1
@@ -187,7 +187,7 @@ void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx) · 186 unmodified lines
187187 }
188188 #endif //CONFIG_ENCODERS
189189
190− if (avctx->lowres == 0 && avctx->bits_per_raw_sample <= 8) {
190+ if (avctx->bits_per_raw_sample <= 8) {
191191 if ((avctx->idct_algo == FF_IDCT_AUTO) ||
192192 (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
193193 c->idct_put = ff_idct_put_altivec;
libavcodec/rv10.c+1−4
@@ -435,8 +435,7 @@ av_log(s->avctx, AV_LOG_DEBUG, "\n");*/ · 434 unmodified lines
435435 // s->obmc=1;
436436 // s->umvplus=1;
437437 s->modified_quant=1;
438− if(!s->avctx->lowres)
439− s->loop_filter=1;
438+ s->loop_filter=1;
440439
441440 if(s->avctx->debug & FF_DEBUG_PICT_INFO){
442441 av_log(s->avctx, AV_LOG_INFO, "num:%5d x:%2d y:%2d type:%d qscale:%2d rnd:%d\n",
@@ -755,7 +754,6 @@ AVCodec ff_rv10_decoder = { · 312 unmodified lines
755754 .close = rv10_decode_end,
756755 .decode = rv10_decode_frame,
757756 .capabilities = CODEC_CAP_DR1,
758− .max_lowres = 3,
759757 .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
760758 .pix_fmts = ff_pixfmt_list_420,
761759 };
@@ -770,7 +768,6 @@ AVCodec ff_rv20_decoder = { · 8 unmodified lines
770768 .decode = rv10_decode_frame,
771769 .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY,
772770 .flush = ff_mpeg_flush,
773− .max_lowres = 3,
774771 .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
775772 .pix_fmts = ff_pixfmt_list_420,
776773 };
libavcodec/sp5xdec.c+0−1
@@ -102,7 +102,6 @@ AVCodec ff_sp5x_decoder = { · 101 unmodified lines
102102 .close = ff_mjpeg_decode_end,
103103 .decode = sp5x_decode_frame,
104104 .capabilities = CODEC_CAP_DR1,
105− .max_lowres = 3,
106105 .long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
107106 };
108107
libavcodec/utils.c+4−4
@@ -149,8 +149,8 @@ unsigned avcodec_get_edge_width(void) · 148 unmodified lines
149149 void avcodec_set_dimensions(AVCodecContext *s, int width, int height){
150150 s->coded_width = width;
151151 s->coded_height= height;
152− s->width = -((-width )>>s->lowres);
153− s->height= -((-height)>>s->lowres);
152+ s->width = width;
153+ s->height = height;
154154 }
155155
156156 #define INTERNAL_BUFFER_SIZE (32+1)
@@ -239,9 +239,8 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 82 unmodified lines
239239
240240 *width = FFALIGN(*width , w_align);
241241 *height= FFALIGN(*height, h_align);
242− if(s->codec_id == CODEC_ID_H264 || s->lowres)
242+ if (s->codec_id == CODEC_ID_H264)
243243 *height+=2; // some of the optimized chroma MC reads one line too much
244− // which is also done in mpeg decoders with lowres > 0
245244
246245 for (i = 0; i < 4; i++)
247246 linesize_align[i] = STRIDE_ALIGN;
@@ -844,6 +843,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD · 596 unmodified lines
844843 ret = AVERROR(EINVAL);
845844 goto free_and_end;
846845 }
846+
847847 if (av_codec_is_encoder(avctx->codec)) {
848848 int i;
849849 if (avctx->codec->sample_fmts) {
libavcodec/x86/dsputil_mmx.c+1−1
@@ -3203,7 +3203,7 @@ void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx) · 3202 unmodified lines
32033203 if (mm_flags & AV_CPU_FLAG_MMX) {
32043204 const int idct_algo = avctx->idct_algo;
32053205
3206− if (avctx->lowres == 0 && avctx->bits_per_raw_sample <= 8) {
3206+ if (avctx->bits_per_raw_sample <= 8) {
32073207 if (idct_algo == FF_IDCT_AUTO || idct_algo == FF_IDCT_SIMPLEMMX) {
32083208 c->idct_put = ff_simple_idct_put_mmx;
32093209 c->idct_add = ff_simple_idct_add_mmx;
libavformat/mov.c+1−1
@@ -1852,7 +1852,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 1851 unmodified lines
18521852 unsigned int stts_sample = 0;
18531853 unsigned int sample_size;
18541854 unsigned int distance = 0;
1855− int key_off = sc->keyframe_count && sc->keyframes[0] == 1;
1855+ int key_off = (sc->keyframe_count && sc->keyframes[0] > 0) || (sc->stps_data && sc->stps_data[0] > 0);
18561856
18571857 current_dts -= sc->dts_shift;
18581858
libavutil/arm/Makefile+1−0
@@ -0,0 +1 @@
1+OBJS += arm/cpu.o
libavutil/arm/cpu.c+30−0
@@ -0,0 +1,30 @@
1+/*
2+ * This file is part of Libav.
3+ *
4+ * Libav is free software; you can redistribute it and/or
5+ * modify it under the terms of the GNU Lesser General Public
6+ * License as published by the Free Software Foundation; either
7+ * version 2.1 of the License, or (at your option) any later version.
8+ *
9+ * Libav is distributed in the hope that it will be useful,
10+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+ * Lesser General Public License for more details.
13+ *
14+ * You should have received a copy of the GNU Lesser General Public
15+ * License along with Libav; if not, write to the Free Software
16+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+ */
18+
19+#include "libavutil/cpu.h"
20+#include "config.h"
21+
22+int ff_get_cpu_flags_arm(void)
23+{
24+ return AV_CPU_FLAG_ARMV5TE * HAVE_ARMV5TE |
25+ AV_CPU_FLAG_ARMV6 * HAVE_ARMV6 |
26+ AV_CPU_FLAG_ARMV6T2 * HAVE_ARMV6T2 |
27+ AV_CPU_FLAG_VFP * HAVE_ARMVFP |
28+ AV_CPU_FLAG_VFPV3 * HAVE_VFPV3 |
29+ AV_CPU_FLAG_NEON * HAVE_NEON;
30+}
libavutil/arm/cpu.h+32−0
@@ -0,0 +1,32 @@
1+/*
2+ * This file is part of Libav.
3+ *
4+ * Libav is free software; you can redistribute it and/or
5+ * modify it under the terms of the GNU Lesser General Public
6+ * License as published by the Free Software Foundation; either
7+ * version 2.1 of the License, or (at your option) any later version.
8+ *
9+ * Libav is distributed in the hope that it will be useful,
10+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+ * Lesser General Public License for more details.
13+ *
14+ * You should have received a copy of the GNU Lesser General Public
15+ * License along with Libav; if not, write to the Free Software
16+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+ */
18+
19+#ifndef AVUTIL_ARM_CPU_H
20+#define AVUTIL_ARM_CPU_H
21+
22+#include "config.h"
23+#include "libavutil/cpu.h"
24+
25+#define have_armv5te(flags) (HAVE_ARMV5TE && ((flags) & AV_CPU_FLAG_ARMV5TE))
26+#define have_armv6(flags) (HAVE_ARMV6 && ((flags) & AV_CPU_FLAG_ARMV6))
27+#define have_armv6t2(flags) (HAVE_ARMV6T2 && ((flags) & AV_CPU_FLAG_ARMV6T2))
28+#define have_vfp(flags) (HAVE_ARMVFP && ((flags) & AV_CPU_FLAG_VFP))
29+#define have_vfpv3(flags) (HAVE_VFPV3 && ((flags) & AV_CPU_FLAG_VFPV3))
30+#define have_neon(flags) (HAVE_NEON && ((flags) & AV_CPU_FLAG_NEON))
31+
32+#endif
libavutil/cpu.c+9−1
@@ -31,6 +31,7 @@ int av_get_cpu_flags(void) · 30 unmodified lines
3131 if (checked)
3232 return flags;
3333
34+ if (ARCH_ARM) flags = ff_get_cpu_flags_arm();
3435 if (ARCH_PPC) flags = ff_get_cpu_flags_ppc();
3536 if (ARCH_X86) flags = ff_get_cpu_flags_x86();
3637
@@ -54,7 +55,14 @@ static const struct { · 17 unmodified lines
5455 int flag;
5556 const char *name;
5657 } cpu_flag_tab[] = {
57−#if ARCH_PPC
58+#if ARCH_ARM
59+ { AV_CPU_FLAG_ARMV5TE, "armv5te" },
60+ { AV_CPU_FLAG_ARMV6, "armv6" },
61+ { AV_CPU_FLAG_ARMV6T2, "armv6t2" },
62+ { AV_CPU_FLAG_VFP, "vfp" },
63+ { AV_CPU_FLAG_VFPV3, "vfpv3" },
64+ { AV_CPU_FLAG_NEON, "neon" },
65+#elif ARCH_PPC
5866 { AV_CPU_FLAG_ALTIVEC, "altivec" },
5967 #elif ARCH_X86
6068 { AV_CPU_FLAG_MMX, "mmx" },
libavutil/cpu.h+8−0
@@ -45,6 +45,13 @@ · 44 unmodified lines
4545 #define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
4646 #define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
4747
48+#define AV_CPU_FLAG_ARMV5TE (1 << 0)
49+#define AV_CPU_FLAG_ARMV6 (1 << 1)
50+#define AV_CPU_FLAG_ARMV6T2 (1 << 2)
51+#define AV_CPU_FLAG_VFP (1 << 3)
52+#define AV_CPU_FLAG_VFPV3 (1 << 4)
53+#define AV_CPU_FLAG_NEON (1 << 5)
54+
4855 /**
4956 * Return the flags which specify extensions supported by the CPU.
5057 */
@@ -66,6 +73,7 @@ void av_force_cpu_flags(int flags); · 15 unmodified lines
6673 attribute_deprecated void av_set_cpu_flags_mask(int mask);
6774
6875 /* The following CPU-specific functions shall not be called directly. */
76+int ff_get_cpu_flags_arm(void);
6977 int ff_get_cpu_flags_ppc(void);
7078 int ff_get_cpu_flags_x86(void);
7179

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