| 1 |
/* |
| 2 |
* Copyright © 2014 Intel Corporation |
| 3 |
* |
| 4 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 5 |
* copy of this software and associated documentation files (the |
| 6 |
* "Software"), to deal in the Software without restriction, including |
| 7 |
* without limitation the rights to use, copy, modify, merge, publish, |
| 8 |
* distribute, sub license, and/or sell copies of the Software, and to |
| 9 |
* permit persons to whom the Software is furnished to do so, subject to |
| 10 |
* the following conditions: |
| 11 |
* |
| 12 |
* The above copyright notice and this permission notice (including the |
| 13 |
* next paragraph) shall be included in all copies or substantial portions |
| 14 |
* of the Software. |
| 15 |
* |
| 16 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 17 |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
| 19 |
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR |
| 20 |
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 21 |
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 22 |
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 23 |
* |
| 24 |
* Authors: |
| 25 |
* Xiang Haihao <[email protected]> |
| 26 |
* |
| 27 |
*/ |
| 28 |
|
| 29 |
#ifndef GEN9_MFD_H |
| 30 |
#define GEN9_MFD_H |
| 31 |
|
| 32 |
#include <xf86drm.h> |
| 33 |
#include <drm.h> |
| 34 |
#include <i915_drm.h> |
| 35 |
#include <intel_bufmgr.h> |
| 36 |
#include "i965_decoder.h" |
| 37 |
#include "vp9_probs.h" |
| 38 |
|
| 39 |
struct hw_context; |
| 40 |
|
| 41 |
typedef struct vp9_frame_status { |
| 42 |
uint16_t frame_width; |
| 43 |
uint16_t frame_height; |
| 44 |
uint8_t frame_type; |
| 45 |
uint8_t show_frame; |
| 46 |
uint8_t refresh_frame_context; |
| 47 |
uint8_t frame_context_idx; |
| 48 |
uint8_t intra_only; |
| 49 |
uint8_t prob_buffer_saved_flag; |
| 50 |
uint8_t prob_buffer_restored_flag; |
| 51 |
dri_bo *prob_buffer_bo; |
| 52 |
} vp9_last_frame_status; |
| 53 |
|
| 54 |
typedef struct vp9_mv_temporal_buffer { |
| 55 |
dri_bo *bo; |
| 56 |
uint16_t frame_width; |
| 57 |
uint16_t frame_height; |
| 58 |
} VP9_MV_BUFFER; |
| 59 |
|
| 60 |
struct gen9_hcpd_context { |
| 61 |
struct hw_context base; |
| 62 |
|
| 63 |
GenFrameStoreContext fs_ctx; |
| 64 |
|
| 65 |
GenFrameStore reference_surfaces[MAX_GEN_HCP_REFERENCE_FRAMES]; |
| 66 |
|
| 67 |
VAIQMatrixBufferHEVC iq_matrix_hevc; |
| 68 |
|
| 69 |
uint16_t picture_width_in_pixels; |
| 70 |
uint16_t picture_height_in_pixels; |
| 71 |
uint16_t picture_width_in_ctbs; |
| 72 |
uint16_t picture_height_in_ctbs; |
| 73 |
uint16_t picture_width_in_min_cb_minus1; |
| 74 |
uint16_t picture_height_in_min_cb_minus1; |
| 75 |
uint8_t ctb_size; |
| 76 |
uint8_t min_cb_size; |
| 77 |
|
| 78 |
GenBuffer deblocking_filter_line_buffer; |
| 79 |
GenBuffer deblocking_filter_tile_line_buffer; |
| 80 |
GenBuffer deblocking_filter_tile_column_buffer; |
| 81 |
GenBuffer metadata_line_buffer; |
| 82 |
GenBuffer metadata_tile_line_buffer; |
| 83 |
GenBuffer metadata_tile_column_buffer; |
| 84 |
GenBuffer sao_line_buffer; |
| 85 |
GenBuffer sao_tile_line_buffer; |
| 86 |
GenBuffer sao_tile_column_buffer; |
| 87 |
GenBuffer hvd_line_rowstore_buffer; |
| 88 |
GenBuffer hvd_tile_rowstore_buffer; |
| 89 |
GenBuffer vp9_probability_buffer; |
| 90 |
GenBuffer vp9_segment_id_buffer; |
| 91 |
VP9_MV_BUFFER vp9_mv_temporal_buffer_curr; |
| 92 |
VP9_MV_BUFFER vp9_mv_temporal_buffer_last; |
| 93 |
|
| 94 |
unsigned short first_inter_slice_collocated_ref_idx; |
| 95 |
unsigned short first_inter_slice_collocated_from_l0_flag; |
| 96 |
int first_inter_slice_valid; |
| 97 |
|
| 98 |
vp9_last_frame_status last_frame; |
| 99 |
FRAME_CONTEXT vp9_frame_ctx[FRAME_CONTEXTS]; |
| 100 |
FRAME_CONTEXT vp9_fc_inter_default; |
| 101 |
FRAME_CONTEXT vp9_fc_key_default; |
| 102 |
}; |
| 103 |
|
| 104 |
#endif /* GEN9_MFD_H */ |