hardware/intel/intel-driver
Revisión | 5482dc227671f5d64aa09f0af5c6001d6cab7678 (tree) |
---|---|
Tiempo | 2014-12-14 01:42:17 |
Autor | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
HEVC: update frame store index
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 6f3f9d024a5b000ae86b2b85d35b6e3679903f5d)
@@ -77,6 +77,7 @@ gen9_hcpd_init_hevc_surface(VADriverContextP ctx, | ||
77 | 77 | |
78 | 78 | if (!gen9_hevc_surface) { |
79 | 79 | gen9_hevc_surface = calloc(sizeof(GenHevcSurface), 1); |
80 | + gen9_hevc_surface->base.frame_store_id = -1; | |
80 | 81 | obj_surface->private_data = gen9_hevc_surface; |
81 | 82 | } |
82 | 83 |
@@ -127,6 +128,11 @@ gen9_hcpd_hevc_decode_init(VADriverContextP ctx, | ||
127 | 128 | |
128 | 129 | assert(decode_state->pic_param && decode_state->pic_param->buffer); |
129 | 130 | pic_param = (VAPictureParameterBufferHEVC *)decode_state->pic_param->buffer; |
131 | + intel_update_hevc_frame_store_index(ctx, | |
132 | + decode_state, | |
133 | + pic_param, | |
134 | + gen9_hcpd_context->reference_surfaces, | |
135 | + &gen9_hcpd_context->fs_ctx); | |
130 | 136 | |
131 | 137 | gen9_hcpd_context->picture_width_in_pixels = pic_param->pic_width_in_luma_samples; |
132 | 138 | gen9_hcpd_context->picture_height_in_pixels = pic_param->pic_height_in_luma_samples; |
@@ -41,6 +41,8 @@ struct gen9_hcpd_context | ||
41 | 41 | { |
42 | 42 | struct hw_context base; |
43 | 43 | |
44 | + GenFrameStoreContext fs_ctx; | |
45 | + | |
44 | 46 | GenFrameStore reference_surfaces[MAX_GEN_HCP_REFERENCE_FRAMES]; |
45 | 47 | |
46 | 48 | VAIQMatrixBufferHEVC iq_matrix_hevc; |
@@ -671,6 +671,23 @@ intel_update_avc_frame_store_index( | ||
671 | 671 | } |
672 | 672 | |
673 | 673 | void |
674 | +intel_update_hevc_frame_store_index( | |
675 | + VADriverContextP ctx, | |
676 | + struct decode_state *decode_state, | |
677 | + VAPictureParameterBufferHEVC *pic_param, | |
678 | + GenFrameStore frame_store[MAX_GEN_HCP_REFERENCE_FRAMES], | |
679 | + GenFrameStoreContext *fs_ctx | |
680 | + ) | |
681 | +{ | |
682 | + intel_update_codec_frame_store_index(ctx, | |
683 | + decode_state, | |
684 | + pic_param->CurrPic.pic_order_cnt, | |
685 | + frame_store, | |
686 | + MAX_GEN_HCP_REFERENCE_FRAMES, | |
687 | + fs_ctx); | |
688 | +} | |
689 | + | |
690 | +void | |
674 | 691 | gen75_update_avc_frame_store_index( |
675 | 692 | VADriverContextP ctx, |
676 | 693 | struct decode_state *decode_state, |
@@ -111,6 +111,15 @@ intel_update_avc_frame_store_index( | ||
111 | 111 | ); |
112 | 112 | |
113 | 113 | void |
114 | +intel_update_hevc_frame_store_index( | |
115 | + VADriverContextP ctx, | |
116 | + struct decode_state *decode_state, | |
117 | + VAPictureParameterBufferHEVC *pic_param, | |
118 | + GenFrameStore frame_store[MAX_GEN_HCP_REFERENCE_FRAMES], | |
119 | + GenFrameStoreContext *fs_ctx | |
120 | +); | |
121 | + | |
122 | +void | |
114 | 123 | gen75_update_avc_frame_store_index( |
115 | 124 | VADriverContextP ctx, |
116 | 125 | struct decode_state *decode_state, |
@@ -55,6 +55,7 @@ extern int intel_format_convert(float src, int out_int_bits, int out_frac_bits,i | ||
55 | 55 | typedef struct gen_hevc_surface GenHevcSurface; |
56 | 56 | struct gen_hevc_surface |
57 | 57 | { |
58 | + GenCodecSurface base; | |
58 | 59 | dri_bo *motion_vector_temporal_bo; |
59 | 60 | }; |
60 | 61 |