* commit 'ce378f0dd0c4e5350b3280e6b3e8d6b46fe4b0a3': fate: Use wmv2 IDCT for wmv2 tests vorbisdsp: change block_size type from int to intptr_t. Conflicts: tests/fate-run.sh tests/fate/vcodec.mak
Unified · Split
| @@ -24,7 +24,8 @@ · 23 unmodified lines | ||
| 24 | 24 | #include "libavutil/arm/cpu.h" |
| 25 | 25 | #include "libavcodec/vorbisdsp.h" |
| 26 | 26 | |
| 27 | −void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize); | |
| 27 | +void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, | |
| 28 | + intptr_t blocksize); | |
| 28 | 29 | |
| 29 | 30 | void ff_vorbisdsp_init_arm(VorbisDSPContext *c) |
| 30 | 31 | { |
| @@ -27,7 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | |
| 28 | 28 | #if HAVE_ALTIVEC |
| 29 | 29 | static void vorbis_inverse_coupling_altivec(float *mag, float *ang, |
| 30 | − int blocksize) | |
| 30 | + intptr_t blocksize) | |
| 31 | 31 | { |
| 32 | 32 | int i; |
| 33 | 33 | vector float m, a; |
| @@ -43,7 +43,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num); · 42 unmodified lines | ||
| 43 | 43 | void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values, |
| 44 | 44 | uint16_t *y_list, int *flag, |
| 45 | 45 | int multiplier, float * out, int samples); |
| 46 | −void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize); | |
| 46 | +void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize); | |
| 47 | 47 | |
| 48 | 48 | #define ilog(i) av_log2(2*(i)) |
| 49 | 49 | |
| @@ -1460,7 +1460,7 @@ static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, · 1459 unmodified lines | ||
| 1460 | 1460 | } |
| 1461 | 1461 | } |
| 1462 | 1462 | |
| 1463 | −void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize) | |
| 1463 | +void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize) | |
| 1464 | 1464 | { |
| 1465 | 1465 | int i; |
| 1466 | 1466 | for (i = 0; i < blocksize; i++) { |
| @@ -19,9 +19,12 @@ · 18 unmodified lines | ||
| 19 | 19 | #ifndef AVCODEC_VORBISDSP_H |
| 20 | 20 | #define AVCODEC_VORBISDSP_H |
| 21 | 21 | |
| 22 | +#include <stdint.h> | |
| 23 | + | |
| 22 | 24 | typedef struct VorbisDSPContext { |
| 23 | 25 | /* assume len is a multiple of 4, and arrays are 16-byte aligned */ |
| 24 | − void (*vorbis_inverse_coupling)(float *mag, float *ang, int blocksize); | |
| 26 | + void (*vorbis_inverse_coupling)(float *mag, float *ang, | |
| 27 | + intptr_t blocksize); | |
| 25 | 28 | } VorbisDSPContext; |
| 26 | 29 | |
| 27 | 30 | void ff_vorbisdsp_init(VorbisDSPContext *dsp); |
| @@ -55,6 +55,10 @@ static int encode_ext_header(Wmv2Context *w){ · 54 unmodified lines | ||
| 55 | 55 | static av_cold int wmv2_encode_init(AVCodecContext *avctx){ |
| 56 | 56 | Wmv2Context * const w= avctx->priv_data; |
| 57 | 57 | |
| 58 | + if(avctx->idct_algo==FF_IDCT_AUTO){ | |
| 59 | + avctx->idct_algo=FF_IDCT_WMV2; | |
| 60 | + } | |
| 61 | + | |
| 58 | 62 | if(ff_MPV_encode_init(avctx) < 0) |
| 59 | 63 | return -1; |
| 60 | 64 | |
| @@ -25,7 +25,8 @@ · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | #if HAVE_INLINE_ASM |
| 27 | 27 | #if ARCH_X86_32 |
| 28 | −static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize) | |
| 28 | +static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, | |
| 29 | + intptr_t blocksize) | |
| 29 | 30 | { |
| 30 | 31 | int i; |
| 31 | 32 | __asm__ volatile ("pxor %%mm7, %%mm7":); |
| @@ -54,7 +55,8 @@ static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize) · 22 unmodified lines | ||
| 54 | 55 | } |
| 55 | 56 | #endif |
| 56 | 57 | |
| 57 | −static void vorbis_inverse_coupling_sse(float *mag, float *ang, int blocksize) | |
| 58 | +static void vorbis_inverse_coupling_sse(float *mag, float *ang, | |
| 59 | + intptr_t blocksize) | |
| 58 | 60 | { |
| 59 | 61 | int i; |
| 60 | 62 | |
| @@ -128,6 +128,7 @@ enc_dec(){ · 127 unmodified lines | ||
| 128 | 128 | enc_opt=$4 |
| 129 | 129 | dec_fmt=$5 |
| 130 | 130 | dec_opt=$6 |
| 131 | + ddc_opt=$8 | |
| 131 | 132 | encfile="${outdir}/${test}.${enc_fmt}" |
| 132 | 133 | decfile="${outdir}/${test}.out.${dec_fmt}" |
| 133 | 134 | cleanfiles="$cleanfiles $decfile" |
| @@ -139,7 +140,7 @@ enc_dec(){ · 5 unmodified lines | ||
| 139 | 140 | -f $enc_fmt -y $tencfile || return |
| 140 | 141 | do_md5sum $encfile |
| 141 | 142 | echo $(wc -c $encfile) |
| 142 | − ffmpeg $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ | |
| 143 | + ffmpeg $DEC_OPTS $ddc_opt -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ | |
| 143 | 144 | -f $dec_fmt -y $tdecfile || return |
| 144 | 145 | do_md5sum $decfile |
| 145 | 146 | tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift |
| @@ -2,7 +2,7 @@ fate-vsynth1-%: SRC = tests/data/vsynth1.yuv · 1 unmodified line | ||
| 2 | 2 | fate-vsynth2-%: SRC = tests/data/vsynth2.yuv |
| 3 | 3 | fate-vsynth%: CODEC = $(word 3, $(subst -, ,$(@))) |
| 4 | 4 | fate-vsynth%: FMT = avi |
| 5 | −fate-vsynth%: CMD = enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 $(DECOPTS)" -keep "$(DECINOPTS)" | |
| 5 | +fate-vsynth%: CMD = enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 $(DECOPTS)" -keep "$(DDCOPTS)" | |
| 6 | 6 | fate-vsynth%: CMP_UNIT = 1 |
| 7 | 7 | fate-vsynth%: REF = $(SRC_PATH)/tests/ref/vsynth/$(@:fate-%=%) |
| 8 | 8 | |
| @@ -91,7 +91,7 @@ fate-vsynth%-jpegls: DECOPTS = -sws_flags area · 82 unmodified lines | ||
| 91 | 91 | |
| 92 | 92 | FATE_VCODEC-$(call ENCDEC, JPEG2000, AVI) += j2k |
| 93 | 93 | fate-vsynth%-j2k: ENCOPTS = -qscale 7 -strict experimental -pix_fmt rgb24 |
| 94 | −fate-vsynth%-j2k: DECINOPTS = -vcodec j2k -strict experimental | |
| 94 | +fate-vsynth%-j2k: DDCOPTS = -vcodec j2k -strict experimental | |
| 95 | 95 | |
| 96 | 96 | FATE_VCODEC-$(call ENCDEC, LJPEG MJPEG, AVI) += ljpeg |
| 97 | 97 | fate-vsynth%-ljpeg: ENCOPTS = -strict -1 |
| @@ -268,7 +268,8 @@ FATE_VCODEC-$(call ENCDEC, WMV1, AVI) += wmv1 · 170 unmodified lines | ||
| 268 | 268 | fate-vsynth%-wmv1: ENCOPTS = -qscale 10 |
| 269 | 269 | |
| 270 | 270 | FATE_VCODEC-$(call ENCDEC, WMV2, AVI) += wmv2 |
| 271 | −fate-vsynth%-wmv2: ENCOPTS = -qscale 10 | |
| 271 | +fate-vsynth%-wmv2: DDCOPTS = -idct auto | |
| 272 | +fate-vsynth%-wmv2: ENCOPTS = -qscale 10 -idct auto | |
| 272 | 273 | |
| 273 | 274 | FATE_VCODEC-$(call ENCDEC, RAWVIDEO, AVI) += yuv |
| 274 | 275 | fate-vsynth%-yuv: CODEC = rawvideo |