#include <va/va_vpp.h>
#include <va/va_backend.h>
#include <va/va_backend_vpp.h>
+#include <va/va_fei.h>
+#include <va/va_fei_h264.h>
+
+#include "va_backend_compat.h"
#include "i965_mutext.h"
#include "object_heap.h"
#include "i965_fourcc.h"
#define I965_MAX_PROFILES 20
-#define I965_MAX_ENTRYPOINTS 5
+#define I965_MAX_ENTRYPOINTS 7
#define I965_MAX_CONFIG_ATTRIBUTES 32
#define I965_MAX_IMAGE_FORMATS 10
#define I965_MAX_SUBPIC_FORMATS 6
#define ENCODER_QUALITY_RANGE 2
#define ENCODER_QUALITY_RANGE_AVC 7
#define ENCODER_QUALITY_RANGE_HEVC 7
+#define ENCODER_QUALITY_RANGE_VP9 7
#define ENCODER_DEFAULT_QUALITY 1
#define ENCODER_DEFAULT_QUALITY_AVC 4
#define ENCODER_DEFAULT_QUALITY_HEVC 4
+#define ENCODER_DEFAULT_QUALITY_VP9 4
#define ENCODER_HIGH_QUALITY ENCODER_DEFAULT_QUALITY
#define ENCODER_LOW_QUALITY 2
+#define I965_MIN_CODEC_ENC_RESOLUTION_WIDTH_HEIGHT 32
#define I965_MAX_NUM_ROI_REGIONS 8
#define I965_MAX_NUM_SLICE 32
#define ENCODER_LP_QUALITY_RANGE 8
+#define STATS_MAX_NUM_PAST_REFS 1
+#define STATS_MAX_NUM_FUTURE_REFS 1
+#define STATS_MAX_NUM_OUTPUTS 2
+#define STATS_INTERLACED_SUPPORT 0
+
#define HAS_MPEG2_DECODING(ctx) ((ctx)->codec_info->has_mpeg2_decoding && \
(ctx)->intel.has_bsd)
#define HAS_LP_H264_ENCODING(ctx) ((ctx)->codec_info->has_lp_h264_encoding && \
(ctx)->intel.has_bsd)
+#define HAS_FEI_H264_ENCODING(ctx) ((ctx)->codec_info->has_fei_h264_encoding && \
+ (ctx)->intel.has_bsd)
+
+#define HAS_H264_PREENC(ctx) ((ctx)->codec_info->has_h264_preenc)
+
#define HAS_VC1_DECODING(ctx) ((ctx)->codec_info->has_vc1_decoding && \
(ctx)->intel.has_bsd)
#define HAS_VP9_ENCODING(ctx) ((ctx)->codec_info->has_vp9_encoding && \
(ctx)->intel.has_bsd)
+#define HAS_LP_VP9_ENCODING(ctx) ((ctx)->codec_info->has_lp_vp9_encoding && \
+ (ctx)->intel.has_huc)
+
#define HAS_VP9_ENCODING_PROFILE(ctx, profile) \
(HAS_VP9_ENCODING(ctx) && \
((ctx)->codec_info->vp9_enc_profiles & (1U << (profile - VAProfileVP9Profile0))))
int has_layers;
- struct buffer_store *misc_param[16][8];
+ struct buffer_store *misc_param[19][8];
+
+ /* To store the VAStatsStatisticsParameterBufferType buffers */
+ struct buffer_store *stat_param_ext;
VASurfaceID current_render_target;
struct object_surface *input_yuv_object;
#define CODEC_DEC 0
#define CODEC_ENC 1
#define CODEC_PROC 2
+#define CODEC_PREENC 3
union codec_state {
struct codec_state_base base;
unsigned int has_vpp_p010: 1;
unsigned int has_lp_h264_encoding: 1;
unsigned int has_vp9_encoding: 1;
+ unsigned int has_fei_h264_encoding: 1;
+ unsigned int has_h264_preenc: 1;
+ unsigned int has_lp_vp9_encoding: 1;
unsigned int lp_h264_brc_mode;
+ unsigned int lp_vp9_brc_mode;
+
unsigned int h264_brc_mode;
+ unsigned int vp9_brc_mode;
unsigned int num_filters;
struct i965_filter filters[VAProcFilterCount];
void
i965_destroy_surface_storage(struct object_surface *obj_surface);
+// Logging functions for errors (to be shown to users) and info (useful for developers).
+void i965_log_error(VADriverContextP ctx, const char *format, ...);
+void i965_log_info(VADriverContextP ctx, const char *format, ...);
+
#endif /* _I965_DRV_VIDEO_H_ */