Rev 4349 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4349 | Rev 5601 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | * @addtogroup VAAPI_Decoding |
28 | * @addtogroup VAAPI_Decoding |
29 | * |
29 | * |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
Line -... | Line 32... | ||
- | 32 | ||
- | 33 | #define ENTER() printf("enter %s\n",__FUNCTION__) |
|
- | 34 | #define LEAVE() printf("leave %s\n",__FUNCTION__) |
|
- | 35 | #define FAIL() printf("fail %s\n",__FUNCTION__) |
|
- | 36 | ||
32 | 37 | ||
33 | static void destroy_buffers(VADisplay display, VABufferID *buffers, unsigned int n_buffers) |
38 | static void destroy_buffers(VADisplay display, VABufferID *buffers, unsigned int n_buffers) |
34 | { |
39 | { |
35 | unsigned int i; |
40 | unsigned int i; |
36 | for (i = 0; i < n_buffers; i++) { |
41 | for (i = 0; i < n_buffers; i++) { |
Line 150... | Line 155... | ||
150 | 155 | ||
151 | VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size) |
156 | VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, const uint8_t *buffer, uint32_t size) |
152 | { |
157 | { |
153 | uint8_t *slice_params; |
158 | uint8_t *slice_params; |
154 | VASliceParameterBufferBase *slice_param; |
159 | VASliceParameterBufferBase *slice_param; |
155 | 160 | ENTER(); |
|
156 | if (!vactx->slice_data) |
161 | if (!vactx->slice_data) |
157 | vactx->slice_data = buffer; |
162 | vactx->slice_data = buffer; |
158 | if (vactx->slice_data + vactx->slice_data_size != buffer) { |
163 | if (vactx->slice_data + vactx->slice_data_size != buffer) { |
159 | if (ff_vaapi_commit_slices(vactx) < 0) |
164 | if (ff_vaapi_commit_slices(vactx) < 0) |
Line 174... | Line 179... | ||
174 | slice_param->slice_data_offset = vactx->slice_data_size; |
179 | slice_param->slice_data_offset = vactx->slice_data_size; |
175 | slice_param->slice_data_flag = VA_SLICE_DATA_FLAG_ALL; |
180 | slice_param->slice_data_flag = VA_SLICE_DATA_FLAG_ALL; |
Line 176... | Line 181... | ||
176 | 181 | ||
177 | vactx->slice_count++; |
182 | vactx->slice_count++; |
- | 183 | vactx->slice_data_size += size; |
|
178 | vactx->slice_data_size += size; |
184 | LEAVE(); |
179 | return slice_param; |
185 | return slice_param; |
Line 180... | Line 186... | ||
180 | } |
186 | } |
181 | 187 |