mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit 'ce378f0dd0c4e5350b3280e6b3e8d6b46fe4b0a3'
* 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 Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
cf4515ecd9
@ -24,7 +24,8 @@
|
|||||||
#include "libavutil/arm/cpu.h"
|
#include "libavutil/arm/cpu.h"
|
||||||
#include "libavcodec/vorbisdsp.h"
|
#include "libavcodec/vorbisdsp.h"
|
||||||
|
|
||||||
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize);
|
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang,
|
||||||
|
intptr_t blocksize);
|
||||||
|
|
||||||
void ff_vorbisdsp_init_arm(VorbisDSPContext *c)
|
void ff_vorbisdsp_init_arm(VorbisDSPContext *c)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#if HAVE_ALTIVEC
|
#if HAVE_ALTIVEC
|
||||||
static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
|
static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
|
||||||
int blocksize)
|
intptr_t blocksize)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
vector float m, a;
|
vector float m, a;
|
||||||
|
@ -43,7 +43,7 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num);
|
|||||||
void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,
|
void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,
|
||||||
uint16_t *y_list, int *flag,
|
uint16_t *y_list, int *flag,
|
||||||
int multiplier, float * out, int samples);
|
int multiplier, float * out, int samples);
|
||||||
void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize);
|
void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize);
|
||||||
|
|
||||||
#define ilog(i) av_log2(2*(i))
|
#define ilog(i) av_log2(2*(i))
|
||||||
|
|
||||||
|
@ -1460,7 +1460,7 @@ static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ff_vorbis_inverse_coupling(float *mag, float *ang, int blocksize)
|
void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < blocksize; i++) {
|
for (i = 0; i < blocksize; i++) {
|
||||||
|
@ -19,9 +19,12 @@
|
|||||||
#ifndef AVCODEC_VORBISDSP_H
|
#ifndef AVCODEC_VORBISDSP_H
|
||||||
#define AVCODEC_VORBISDSP_H
|
#define AVCODEC_VORBISDSP_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef struct VorbisDSPContext {
|
typedef struct VorbisDSPContext {
|
||||||
/* assume len is a multiple of 4, and arrays are 16-byte aligned */
|
/* assume len is a multiple of 4, and arrays are 16-byte aligned */
|
||||||
void (*vorbis_inverse_coupling)(float *mag, float *ang, int blocksize);
|
void (*vorbis_inverse_coupling)(float *mag, float *ang,
|
||||||
|
intptr_t blocksize);
|
||||||
} VorbisDSPContext;
|
} VorbisDSPContext;
|
||||||
|
|
||||||
void ff_vorbisdsp_init(VorbisDSPContext *dsp);
|
void ff_vorbisdsp_init(VorbisDSPContext *dsp);
|
||||||
|
@ -55,6 +55,10 @@ static int encode_ext_header(Wmv2Context *w){
|
|||||||
static av_cold int wmv2_encode_init(AVCodecContext *avctx){
|
static av_cold int wmv2_encode_init(AVCodecContext *avctx){
|
||||||
Wmv2Context * const w= avctx->priv_data;
|
Wmv2Context * const w= avctx->priv_data;
|
||||||
|
|
||||||
|
if(avctx->idct_algo==FF_IDCT_AUTO){
|
||||||
|
avctx->idct_algo=FF_IDCT_WMV2;
|
||||||
|
}
|
||||||
|
|
||||||
if(ff_MPV_encode_init(avctx) < 0)
|
if(ff_MPV_encode_init(avctx) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -25,7 +25,8 @@
|
|||||||
|
|
||||||
#if HAVE_INLINE_ASM
|
#if HAVE_INLINE_ASM
|
||||||
#if ARCH_X86_32
|
#if ARCH_X86_32
|
||||||
static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize)
|
static void vorbis_inverse_coupling_3dnow(float *mag, float *ang,
|
||||||
|
intptr_t blocksize)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
__asm__ volatile ("pxor %%mm7, %%mm7":);
|
__asm__ volatile ("pxor %%mm7, %%mm7":);
|
||||||
@ -54,7 +55,8 @@ static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void vorbis_inverse_coupling_sse(float *mag, float *ang, int blocksize)
|
static void vorbis_inverse_coupling_sse(float *mag, float *ang,
|
||||||
|
intptr_t blocksize)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ enc_dec(){
|
|||||||
enc_opt=$4
|
enc_opt=$4
|
||||||
dec_fmt=$5
|
dec_fmt=$5
|
||||||
dec_opt=$6
|
dec_opt=$6
|
||||||
|
ddc_opt=$8
|
||||||
encfile="${outdir}/${test}.${enc_fmt}"
|
encfile="${outdir}/${test}.${enc_fmt}"
|
||||||
decfile="${outdir}/${test}.out.${dec_fmt}"
|
decfile="${outdir}/${test}.out.${dec_fmt}"
|
||||||
cleanfiles="$cleanfiles $decfile"
|
cleanfiles="$cleanfiles $decfile"
|
||||||
@ -139,7 +140,7 @@ enc_dec(){
|
|||||||
-f $enc_fmt -y $tencfile || return
|
-f $enc_fmt -y $tencfile || return
|
||||||
do_md5sum $encfile
|
do_md5sum $encfile
|
||||||
echo $(wc -c $encfile)
|
echo $(wc -c $encfile)
|
||||||
ffmpeg $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \
|
ffmpeg $DEC_OPTS $ddc_opt -i $tencfile $ENC_OPTS $dec_opt $FLAGS \
|
||||||
-f $dec_fmt -y $tdecfile || return
|
-f $dec_fmt -y $tdecfile || return
|
||||||
do_md5sum $decfile
|
do_md5sum $decfile
|
||||||
tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift
|
tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift
|
||||||
|
@ -2,7 +2,7 @@ fate-vsynth1-%: SRC = tests/data/vsynth1.yuv
|
|||||||
fate-vsynth2-%: SRC = tests/data/vsynth2.yuv
|
fate-vsynth2-%: SRC = tests/data/vsynth2.yuv
|
||||||
fate-vsynth%: CODEC = $(word 3, $(subst -, ,$(@)))
|
fate-vsynth%: CODEC = $(word 3, $(subst -, ,$(@)))
|
||||||
fate-vsynth%: FMT = avi
|
fate-vsynth%: FMT = avi
|
||||||
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)"
|
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)"
|
||||||
fate-vsynth%: CMP_UNIT = 1
|
fate-vsynth%: CMP_UNIT = 1
|
||||||
fate-vsynth%: REF = $(SRC_PATH)/tests/ref/vsynth/$(@:fate-%=%)
|
fate-vsynth%: REF = $(SRC_PATH)/tests/ref/vsynth/$(@:fate-%=%)
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ fate-vsynth%-jpegls: DECOPTS = -sws_flags area
|
|||||||
|
|
||||||
FATE_VCODEC-$(call ENCDEC, JPEG2000, AVI) += j2k
|
FATE_VCODEC-$(call ENCDEC, JPEG2000, AVI) += j2k
|
||||||
fate-vsynth%-j2k: ENCOPTS = -qscale 7 -strict experimental -pix_fmt rgb24
|
fate-vsynth%-j2k: ENCOPTS = -qscale 7 -strict experimental -pix_fmt rgb24
|
||||||
fate-vsynth%-j2k: DECINOPTS = -vcodec j2k -strict experimental
|
fate-vsynth%-j2k: DDCOPTS = -vcodec j2k -strict experimental
|
||||||
|
|
||||||
FATE_VCODEC-$(call ENCDEC, LJPEG MJPEG, AVI) += ljpeg
|
FATE_VCODEC-$(call ENCDEC, LJPEG MJPEG, AVI) += ljpeg
|
||||||
fate-vsynth%-ljpeg: ENCOPTS = -strict -1
|
fate-vsynth%-ljpeg: ENCOPTS = -strict -1
|
||||||
@ -268,7 +268,8 @@ FATE_VCODEC-$(call ENCDEC, WMV1, AVI) += wmv1
|
|||||||
fate-vsynth%-wmv1: ENCOPTS = -qscale 10
|
fate-vsynth%-wmv1: ENCOPTS = -qscale 10
|
||||||
|
|
||||||
FATE_VCODEC-$(call ENCDEC, WMV2, AVI) += wmv2
|
FATE_VCODEC-$(call ENCDEC, WMV2, AVI) += wmv2
|
||||||
fate-vsynth%-wmv2: ENCOPTS = -qscale 10
|
fate-vsynth%-wmv2: DDCOPTS = -idct auto
|
||||||
|
fate-vsynth%-wmv2: ENCOPTS = -qscale 10 -idct auto
|
||||||
|
|
||||||
FATE_VCODEC-$(call ENCDEC, RAWVIDEO, AVI) += yuv
|
FATE_VCODEC-$(call ENCDEC, RAWVIDEO, AVI) += yuv
|
||||||
fate-vsynth%-yuv: CODEC = rawvideo
|
fate-vsynth%-yuv: CODEC = rawvideo
|
||||||
|
Loading…
Reference in New Issue
Block a user