You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
3.2KB

  1. /*
  2. * check XMM registers for clobbers on Win64
  3. * Copyright (c) 2012 Ronald S. Bultje <rsbultje@gmail.com>
  4. *
  5. * This file is part of Libav.
  6. *
  7. * Libav 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. * Libav 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 Libav; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include "libavcodec/avcodec.h"
  22. #include "libavutil/x86/w64xmmtest.h"
  23. wrap(avcodec_open2(AVCodecContext *avctx,
  24. const AVCodec *codec,
  25. AVDictionary **options))
  26. {
  27. testxmmclobbers(avcodec_open2, avctx, codec, options);
  28. }
  29. wrap(avcodec_decode_audio4(AVCodecContext *avctx,
  30. AVFrame *frame,
  31. int *got_frame_ptr,
  32. AVPacket *avpkt))
  33. {
  34. testxmmclobbers(avcodec_decode_audio4, avctx, frame,
  35. got_frame_ptr, avpkt);
  36. }
  37. wrap(avcodec_decode_video2(AVCodecContext *avctx,
  38. AVFrame *picture,
  39. int *got_picture_ptr,
  40. AVPacket *avpkt))
  41. {
  42. testxmmclobbers(avcodec_decode_video2, avctx, picture,
  43. got_picture_ptr, avpkt);
  44. }
  45. wrap(avcodec_decode_subtitle2(AVCodecContext *avctx,
  46. AVSubtitle *sub,
  47. int *got_sub_ptr,
  48. AVPacket *avpkt))
  49. {
  50. testxmmclobbers(avcodec_decode_subtitle2, avctx, sub,
  51. got_sub_ptr, avpkt);
  52. }
  53. wrap(avcodec_encode_audio2(AVCodecContext *avctx,
  54. AVPacket *avpkt,
  55. const AVFrame *frame,
  56. int *got_packet_ptr))
  57. {
  58. testxmmclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
  59. got_packet_ptr);
  60. }
  61. wrap(avcodec_encode_subtitle(AVCodecContext *avctx,
  62. uint8_t *buf, int buf_size,
  63. const AVSubtitle *sub))
  64. {
  65. testxmmclobbers(avcodec_encode_subtitle, avctx, buf, buf_size, sub);
  66. }
  67. wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
  68. const AVFrame *frame, int *got_packet_ptr))
  69. {
  70. testxmmclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
  71. }
  72. wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt))
  73. {
  74. testxmmclobbers(avcodec_send_packet, avctx, avpkt);
  75. }
  76. wrap(avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt))
  77. {
  78. testxmmclobbers(avcodec_receive_packet, avctx, avpkt);
  79. }
  80. wrap(avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame))
  81. {
  82. testxmmclobbers(avcodec_send_frame, avctx, frame);
  83. }
  84. wrap(avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame))
  85. {
  86. testxmmclobbers(avcodec_receive_frame, avctx, frame);
  87. }