yading@10
|
1 /*
|
yading@10
|
2 * check XMM registers for clobbers on Win64
|
yading@10
|
3 * Copyright (c) 2012 Ronald S. Bultje <rsbultje@gmail.com>
|
yading@10
|
4 *
|
yading@10
|
5 * This file is part of Libav.
|
yading@10
|
6 *
|
yading@10
|
7 * Libav is free software; you can redistribute it and/or
|
yading@10
|
8 * modify it under the terms of the GNU Lesser General Public
|
yading@10
|
9 * License as published by the Free Software Foundation; either
|
yading@10
|
10 * version 2.1 of the License, or (at your option) any later version.
|
yading@10
|
11 *
|
yading@10
|
12 * Libav is distributed in the hope that it will be useful,
|
yading@10
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
yading@10
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
yading@10
|
15 * Lesser General Public License for more details.
|
yading@10
|
16 *
|
yading@10
|
17 * You should have received a copy of the GNU Lesser General Public
|
yading@10
|
18 * License along with Libav; if not, write to the Free Software
|
yading@10
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
yading@10
|
20 */
|
yading@10
|
21
|
yading@10
|
22 #include "libavcodec/avcodec.h"
|
yading@10
|
23 #include "libavutil/x86/w64xmmtest.h"
|
yading@10
|
24
|
yading@10
|
25 wrap(avcodec_open2(AVCodecContext *avctx,
|
yading@10
|
26 AVCodec *codec,
|
yading@10
|
27 AVDictionary **options))
|
yading@10
|
28 {
|
yading@10
|
29 testxmmclobbers(avcodec_open2, avctx, codec, options);
|
yading@10
|
30 }
|
yading@10
|
31
|
yading@10
|
32 wrap(avcodec_decode_audio4(AVCodecContext *avctx,
|
yading@10
|
33 AVFrame *frame,
|
yading@10
|
34 int *got_frame_ptr,
|
yading@10
|
35 AVPacket *avpkt))
|
yading@10
|
36 {
|
yading@10
|
37 testxmmclobbers(avcodec_decode_audio4, avctx, frame,
|
yading@10
|
38 got_frame_ptr, avpkt);
|
yading@10
|
39 }
|
yading@10
|
40
|
yading@10
|
41 wrap(avcodec_decode_video2(AVCodecContext *avctx,
|
yading@10
|
42 AVFrame *picture,
|
yading@10
|
43 int *got_picture_ptr,
|
yading@10
|
44 AVPacket *avpkt))
|
yading@10
|
45 {
|
yading@10
|
46 testxmmclobbers(avcodec_decode_video2, avctx, picture,
|
yading@10
|
47 got_picture_ptr, avpkt);
|
yading@10
|
48 }
|
yading@10
|
49
|
yading@10
|
50 wrap(avcodec_decode_subtitle2(AVCodecContext *avctx,
|
yading@10
|
51 AVSubtitle *sub,
|
yading@10
|
52 int *got_sub_ptr,
|
yading@10
|
53 AVPacket *avpkt))
|
yading@10
|
54 {
|
yading@10
|
55 testxmmclobbers(avcodec_decode_subtitle2, avctx, sub,
|
yading@10
|
56 got_sub_ptr, avpkt);
|
yading@10
|
57 }
|
yading@10
|
58
|
yading@10
|
59 wrap(avcodec_encode_audio2(AVCodecContext *avctx,
|
yading@10
|
60 AVPacket *avpkt,
|
yading@10
|
61 const AVFrame *frame,
|
yading@10
|
62 int *got_packet_ptr))
|
yading@10
|
63 {
|
yading@10
|
64 testxmmclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
|
yading@10
|
65 got_packet_ptr);
|
yading@10
|
66 }
|
yading@10
|
67
|
yading@10
|
68 wrap(avcodec_encode_video(AVCodecContext *avctx,
|
yading@10
|
69 uint8_t *buf, int buf_size,
|
yading@10
|
70 const AVFrame *pict))
|
yading@10
|
71 {
|
yading@10
|
72 testxmmclobbers(avcodec_encode_video, avctx, buf, buf_size, pict);
|
yading@10
|
73 }
|
yading@10
|
74
|
yading@10
|
75 wrap(avcodec_encode_subtitle(AVCodecContext *avctx,
|
yading@10
|
76 uint8_t *buf, int buf_size,
|
yading@10
|
77 const AVSubtitle *sub))
|
yading@10
|
78 {
|
yading@10
|
79 testxmmclobbers(avcodec_encode_subtitle, avctx, buf, buf_size, sub);
|
yading@10
|
80 }
|