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.

69 lines
1.8KB

  1. /*
  2. * Intel MediaSDK QSV encoder utility functions
  3. *
  4. * copyright (c) 2013 Yukinori Yamazoe
  5. *
  6. * This file is part of Libav.
  7. *
  8. * Libav is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2.1 of the License, or (at your option) any later version.
  12. *
  13. * Libav is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with Libav; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #ifndef AVCODEC_QSVENC_H
  23. #define AVCODEC_QSVENC_H
  24. #include <stdint.h>
  25. #include <sys/types.h>
  26. #include <mfx/mfxvideo.h>
  27. #include "libavutil/avutil.h"
  28. #include "avcodec.h"
  29. #include "qsv_internal.h"
  30. typedef struct QSVEncContext {
  31. AVCodecContext *avctx;
  32. QSVFrame *work_frames;
  33. mfxSession session;
  34. mfxSession internal_session;
  35. int packet_size;
  36. mfxVideoParam param;
  37. mfxFrameAllocRequest req;
  38. mfxExtCodingOption extco;
  39. mfxExtBuffer *extparam[1];
  40. // options set by the caller
  41. int async_depth;
  42. int idr_interval;
  43. int profile;
  44. int preset;
  45. int avbr_accuracy;
  46. int avbr_convergence;
  47. } QSVEncContext;
  48. int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q);
  49. int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
  50. AVPacket *pkt, const AVFrame *frame, int *got_packet);
  51. int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q);
  52. #endif /* AVCODEC_QSVENC_H */