Skip to content

Commit 9ace154

Browse files
committed
Merge commit '99e20125232d40ea239a5b54d26bbfe526506114'
* commit '99e20125232d40ea239a5b54d26bbfe526506114': x86/arm: Add clobber tests to libavresample Merged-by: Michael Niedermayer <[email protected]>
2 parents a067445 + 99e2012 commit 9ace154

File tree

5 files changed

+70
-1
lines changed

5 files changed

+70
-1
lines changed

configure

+3-1
Original file line numberDiff line numberDiff line change
@@ -4639,7 +4639,8 @@ enabled neon_clobber_test &&
46394639
-Wl,--wrap,avcodec_decode_subtitle2 \
46404640
-Wl,--wrap,avcodec_encode_audio2 \
46414641
-Wl,--wrap,avcodec_encode_video2 \
4642-
-Wl,--wrap,avcodec_encode_subtitle ||
4642+
-Wl,--wrap,avcodec_encode_subtitle \
4643+
-Wl,--wrap,avresample_convert ||
46434644
disable neon_clobber_test
46444645

46454646
enabled xmm_clobber_test &&
@@ -4651,6 +4652,7 @@ enabled xmm_clobber_test &&
46514652
-Wl,--wrap,avcodec_encode_video \
46524653
-Wl,--wrap,avcodec_encode_video2 \
46534654
-Wl,--wrap,avcodec_encode_subtitle \
4655+
-Wl,--wrap,avresample_convert \
46544656
-Wl,--wrap,sws_scale ||
46554657
disable xmm_clobber_test
46564658

libavresample/arm/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
OBJS += arm/audio_convert_init.o
2+
3+
OBJS-$(CONFIG_NEON_CLOBBER_TEST) += arm/neontest.o
4+
25
NEON-OBJS += arm/audio_convert_neon.o

libavresample/arm/neontest.c

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* check NEON registers for clobbers
3+
* Copyright (c) 2013 Martin Storsjo
4+
*
5+
* This file is part of FFmpeg.
6+
*
7+
* FFmpeg is free software; you can redistribute it and/or
8+
* modify it under the terms of the GNU Lesser General Public
9+
* License as published by the Free Software Foundation; either
10+
* version 2.1 of the License, or (at your option) any later version.
11+
*
12+
* FFmpeg is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
* Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public
18+
* License along with FFmpeg; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+
*/
21+
22+
#include "libavresample/avresample.h"
23+
#include "libavutil/arm/neontest.h"
24+
25+
wrap(avresample_convert(AVAudioResampleContext *avr, uint8_t **output,
26+
int out_plane_size, int out_samples, uint8_t **input,
27+
int in_plane_size, int in_samples))
28+
{
29+
testneonclobbers(avresample_convert, avr, output, out_plane_size,
30+
out_samples, input, in_plane_size, in_samples);
31+
}

libavresample/x86/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ OBJS += x86/audio_convert_init.o \
22
x86/audio_mix_init.o \
33
x86/dither_init.o \
44

5+
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
6+
57
YASM-OBJS += x86/audio_convert.o \
68
x86/audio_mix.o \
79
x86/dither.o \

libavresample/x86/w64xmmtest.c

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* check XMM registers for clobbers on Win64
3+
* Copyright (c) 2013 Martin Storsjo
4+
*
5+
* This file is part of FFmpeg.
6+
*
7+
* FFmpeg is free software; you can redistribute it and/or
8+
* modify it under the terms of the GNU Lesser General Public
9+
* License as published by the Free Software Foundation; either
10+
* version 2.1 of the License, or (at your option) any later version.
11+
*
12+
* FFmpeg is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
* Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public
18+
* License along with FFmpeg; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+
*/
21+
22+
#include "libavresample/avresample.h"
23+
#include "libavutil/x86/w64xmmtest.h"
24+
25+
wrap(avresample_convert(AVAudioResampleContext *avr, uint8_t **output,
26+
int out_plane_size, int out_samples, uint8_t **input,
27+
int in_plane_size, int in_samples))
28+
{
29+
testxmmclobbers(avresample_convert, avr, output, out_plane_size,
30+
out_samples, input, in_plane_size, in_samples);
31+
}

0 commit comments

Comments
 (0)