Blame va/va_fei.h

Packit 38d9dc
/*
Packit 38d9dc
 * Copyright (c) 2007-2017 Intel Corporation. All Rights Reserved.
Packit 38d9dc
 *
Packit 38d9dc
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit 38d9dc
 * copy of this software and associated documentation files (the
Packit 38d9dc
 * "Software"), to deal in the Software without restriction, including
Packit 38d9dc
 * without limitation the rights to use, copy, modify, merge, publish,
Packit 38d9dc
 * distribute, sub license, and/or sell copies of the Software, and to
Packit 38d9dc
 * permit persons to whom the Software is furnished to do so, subject to
Packit 38d9dc
 * the following conditions:
Packit 38d9dc
 *
Packit 38d9dc
 * The above copyright notice and this permission notice (including the
Packit 38d9dc
 * next paragraph) shall be included in all copies or substantial portions
Packit 38d9dc
 * of the Software.
Packit 38d9dc
 *
Packit 38d9dc
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit 38d9dc
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 38d9dc
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
Packit 38d9dc
 * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
Packit 38d9dc
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
Packit 38d9dc
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
Packit 38d9dc
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Packit 38d9dc
 */
Packit 38d9dc
Packit 38d9dc
/**
Packit 38d9dc
 * \file va_fei.h
Packit 38d9dc
 * \brief The FEI encoding common API
Packit 38d9dc
 */
Packit 38d9dc
Packit 38d9dc
#ifndef VA_FEI_H
Packit 38d9dc
#define VA_FEI_H
Packit 38d9dc
Packit 38d9dc
#ifdef __cplusplus
Packit 38d9dc
extern "C" {
Packit 38d9dc
#endif
Packit 38d9dc
Packit 38d9dc
#include <stdint.h>
Packit 38d9dc
Packit 38d9dc
/**
Packit 38d9dc
 * \defgroup api_fei FEI encoding common API
Packit 38d9dc
 *
Packit 38d9dc
 * @{
Packit 38d9dc
 */
Packit 38d9dc
Packit 38d9dc
/**
Packit 38d9dc
 * \brief FEI specific attribute definitions
Packit 38d9dc
 */
Packit 38d9dc
/** @name Attribute values for VAConfigAttribFEIFunctionType
Packit 38d9dc
 *
Packit 38d9dc
 * This is only for VAEntrypointFEI
Packit 38d9dc
 * The desired type should be passed to driver when creating the configuration.
Packit 38d9dc
 * If VA_FEI_FUNCTION_ENC_PAK is set, VA_FEI_FUNCTION_ENC and VA_FEI_FUNCTION_PAK
Packit 38d9dc
 * will be ignored if set also. Combination of VA_FEI_FUNCTION_ENC and VA_FEI_FUNCTION_PAK
Packit 38d9dc
 * is not valid. If  VA_FEI_FUNCTION_ENC is set, there will be no bitstream output.
Packit 38d9dc
 * If VA_FEI_FUNCTION_PAK is set, two extra input buffers for PAK are needed:
Packit 38d9dc
 * VAEncFEIMVBufferType and VAEncFEIMBCodeBufferType.
Packit 38d9dc
 * VA_FEI_FUNCTION_ENC_PAK is recommended for best performance.
Packit 38d9dc
 *
Packit 38d9dc
 **/
Packit 38d9dc
/**@{*/
Packit 38d9dc
/** \brief ENC only is supported */
Packit 38d9dc
#define VA_FEI_FUNCTION_ENC                             0x00000001
Packit 38d9dc
/** \brief PAK only is supported */
Packit 38d9dc
#define VA_FEI_FUNCTION_PAK                             0x00000002
Packit 38d9dc
/** \brief ENC_PAK is supported */
Packit 38d9dc
#define VA_FEI_FUNCTION_ENC_PAK                         0x00000004
Packit 38d9dc
Packit 38d9dc
/**@}*/
Packit 38d9dc
Packit 38d9dc
/** \brief Attribute value for VAConfigAttribStats */
Packit 38d9dc
typedef union _VAConfigAttribValStats {
Packit 38d9dc
    struct {
Packit 38d9dc
        /** \brief Max number of past reference frames that are supported. */
Packit 38d9dc
        uint32_t    max_num_past_references   : 4;
Packit 38d9dc
        /** \brief Max number of future reference frames that are supported. */
Packit 38d9dc
        uint32_t    max_num_future_references : 4;
Packit 38d9dc
        /** \brief Number of supported output buffers for VAStatsStatisticsParameter->outputs */
Packit 38d9dc
        uint32_t    num_outputs               : 3;
Packit 38d9dc
        /** \brief Interlaced content is supported */
Packit 38d9dc
        uint32_t    interlaced                : 1;
Packit 38d9dc
        uint32_t    reserved                  : 20;
Packit 38d9dc
    } bits;
Packit 38d9dc
    uint32_t value;
Packit 38d9dc
} VAConfigAttribValStats;
Packit 38d9dc
Packit 38d9dc
typedef struct _VAPictureStats
Packit 38d9dc
{
Packit 38d9dc
    VASurfaceID picture_id;
Packit 38d9dc
    /*
Packit 38d9dc
     * see flags below.
Packit 38d9dc
     */
Packit 38d9dc
    uint32_t flags;
Packit 38d9dc
} VAPictureStats;
Packit 38d9dc
/* flags in VAPictureStats could be one of the following */
Packit 38d9dc
#define VA_PICTURE_STATS_INVALID                   0x00000001
Packit 38d9dc
#define VA_PICTURE_STATS_PROGRESSIVE               0x00000000
Packit 38d9dc
#define VA_PICTURE_STATS_TOP_FIELD                 0x00000002
Packit 38d9dc
#define VA_PICTURE_STATS_BOTTOM_FIELD              0x00000004
Packit 38d9dc
/** \brief picutre surface content updated indicator.
Packit 38d9dc
 * The picture surface content is updated, it means temporary buffer like downscaled pixel data in driver
Packit 38d9dc
 * internal needs be forced freshing
Packit 38d9dc
 **/
Packit 38d9dc
#define VA_PICTURE_STATS_CONTENT_UPDATED           0x00000010
Packit 38d9dc
Packit 38d9dc
/** \brief Motion Vector and Statistics frame level controls.
Packit 38d9dc
 * common part VAStatsStatisticsParameterBufferType for a MB or CTB
Packit 38d9dc
 **/
Packit 38d9dc
typedef struct _VAStatsStatisticsParameter
Packit 38d9dc
{
Packit 38d9dc
    /** \brief Source surface ID.  */
Packit 38d9dc
    VAPictureStats  input;
Packit 38d9dc
Packit 38d9dc
    /** \brief Past reference surface ID pointer.  */
Packit 38d9dc
    VAPictureStats  *past_references;
Packit 38d9dc
Packit 38d9dc
    /** \brief Past reference surface number  */
Packit 38d9dc
    uint32_t        num_past_references;
Packit 38d9dc
Packit 38d9dc
    /** \brief Statistics output for past reference surface.
Packit 38d9dc
     * Only enabling statistics output for past reference picture when *past_ref_stat_buf is a valid
Packit 38d9dc
     * VABufferID, it is needed in case app wants statistics data of both reference and current pictures
Packit 38d9dc
     * in very special use cases for better performance.
Packit 38d9dc
     * The output layout is defined by VAStatsStatisticsBufferType(for progressive and top field of
Packit 38d9dc
     * interlaced case) and VAStatsStatisticsBottomFieldBufferType(only for interlaced case), only
Packit 38d9dc
     * pixel_average_16x16/pixel_average_8x8 and variance_16x16/variance_8x8 data are valid.
Packit 38d9dc
     **/
Packit 38d9dc
    VABufferID      *past_ref_stat_buf;
Packit 38d9dc
Packit 38d9dc
    /** \brief Future reference surface ID pointer.  */
Packit 38d9dc
    VAPictureStats  *future_references;
Packit 38d9dc
Packit 38d9dc
    /** \brief Future reference surface number  */
Packit 38d9dc
    uint32_t        num_future_references;
Packit 38d9dc
Packit 38d9dc
    /** \brief Statistics output for future reference surface.
Packit 38d9dc
     * Only enabling statistics output for future reference picture when *past_ref_stat_buf is a valid
Packit 38d9dc
     * VABufferID, it is needed in case app wants statistics data of both reference and current pictures
Packit 38d9dc
     * in very special use cases for better performance.
Packit 38d9dc
     * The output layout is defined by VAStatsStatisticsBufferType(for progressive and top field of
Packit 38d9dc
     * interlaced case) and VAStatsStatisticsBottomFieldBufferType(only for interlaced case), only
Packit 38d9dc
     * pixel_average_16x16/pixel_average_8x8 and variance_16x16/variance_8x8 data are valid.
Packit 38d9dc
     **/
Packit 38d9dc
    VABufferID      *future_ref_stat_buf;
Packit 38d9dc
Packit 38d9dc
    /** \brief ID of the output buffer.
Packit 38d9dc
     * The number of outputs is determined by below DisableMVOutput and DisableStatisticsOutput.
Packit 38d9dc
     * The output layout is defined by VAStatsMVBufferType, VAStatsStatisticsBufferType(for progressive and
Packit 38d9dc
     * top field of interlaced case) and VAStatsStatisticsBottomFieldBufferType(only for interlaced case).
Packit 38d9dc
     **/
Packit 38d9dc
    VABufferID      *outputs;
Packit 38d9dc
Packit 38d9dc
    /** \brief MV predictor. It is valid only when mv_predictor_ctrl is not 0.
Packit 38d9dc
     * Each block has a pair of MVs, one for past and one for future reference
Packit 38d9dc
     * as defined by VAMotionVector. The block is in raster scan order.
Packit 38d9dc
     * Buffer size shall not be less than the number of blocks multiplied by sizeof(VAMotionVector).
Packit 38d9dc
     **/
Packit 38d9dc
    VABufferID      mv_predictor;
Packit 38d9dc
Packit 38d9dc
    /** \brief QP input buffer. It is valid only when mb_qp is set to 1.
Packit 38d9dc
     * The data in this buffer correspond to the input source.
Packit 38d9dc
     * One QP per MB or CTB block in raster scan order, each QP is a signed char (8-bit) value.
Packit 38d9dc
     **/
Packit 38d9dc
    VABufferID      qp;
Packit 38d9dc
} VAStatsStatisticsParameter;
Packit 38d9dc
Packit 38d9dc
#ifdef __cplusplus
Packit 38d9dc
}
Packit 38d9dc
#endif
Packit 38d9dc
Packit 38d9dc
#endif /* VA_FEI_H */