2
0

neontest.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. #include "libavcodec/avcodec.h"
  22. #include "libavutil/arm/neontest.h"
  23. wrap(avcodec_open2(AVCodecContext *avctx,
  24. const AVCodec *codec,
  25. AVDictionary **options))
  26. {
  27. testneonclobbers(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. testneonclobbers(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. testneonclobbers(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. testneonclobbers(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. testneonclobbers(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. testneonclobbers(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. testneonclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
  71. }
  72. wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt))
  73. {
  74. testneonclobbers(avcodec_send_packet, avctx, avpkt);
  75. }
  76. wrap(avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt))
  77. {
  78. testneonclobbers(avcodec_receive_packet, avctx, avpkt);
  79. }
  80. wrap(avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame))
  81. {
  82. testneonclobbers(avcodec_send_frame, avctx, frame);
  83. }
  84. wrap(avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame))
  85. {
  86. testneonclobbers(avcodec_receive_frame, avctx, frame);
  87. }