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.

67 lines
2.0KB

  1. /*
  2. * This file is part of FFmpeg.
  3. *
  4. * FFmpeg is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * FFmpeg is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with FFmpeg; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. /**
  19. * @file
  20. * Intel Quick Sync Video VPP base function
  21. */
  22. #ifndef AVFILTER_QSVVPP_H
  23. #define AVFILTER_QSVVPP_H
  24. #include <mfx/mfxvideo.h>
  25. #include "avfilter.h"
  26. #define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads))
  27. #define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
  28. typedef struct QSVVPPContext QSVVPPContext;
  29. typedef struct QSVVPPCrop {
  30. int in_idx; ///< Input index
  31. int x, y, w, h; ///< Crop rectangle
  32. } QSVVPPCrop;
  33. typedef struct QSVVPPParam {
  34. /* default is ff_filter_frame */
  35. int (*filter_frame)(AVFilterLink *outlink, AVFrame *frame);
  36. /* To fill with MFX enhanced filter configurations */
  37. int num_ext_buf;
  38. mfxExtBuffer **ext_buf;
  39. /* Real output format */
  40. enum AVPixelFormat out_sw_format;
  41. /* Crop information for each input, if needed */
  42. int num_crop;
  43. QSVVPPCrop *crop;
  44. } QSVVPPParam;
  45. /* create and initialize the QSV session */
  46. int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *param);
  47. /* release the resources (eg.surfaces) */
  48. int ff_qsvvpp_free(QSVVPPContext **vpp);
  49. /* vpp filter frame and call the cb if needed */
  50. int ff_qsvvpp_filter_frame(QSVVPPContext *vpp, AVFilterLink *inlink, AVFrame *frame);
  51. #endif /* AVFILTER_QSVVPP_H */