Lines Matching defs:obj_surface

58 VAStatus psb_DestroySurfaceGralloc(object_surface_p obj_surface)
62 buffer_handle_t handle = obj_surface->psb_surface->buf.handle;
70 obj_surface->width, obj_surface->height, (void **)&vaddr[GRALLOC_SUB_BUFFER0])){
71 if (obj_surface->share_info && vaddr[GRALLOC_SUB_BUFFER1] == obj_surface->share_info) {
72 int metadata_rotate = obj_surface->share_info->metadata_rotate;
73 int surface_protected = obj_surface->share_info->surface_protected;
74 int force_output_method = obj_surface->share_info->force_output_method;
75 int bob_deinterlace = obj_surface->share_info->bob_deinterlace;
77 memset(obj_surface->share_info, 0, sizeof(struct psb_surface_share_info_s));
79 obj_surface->share_info->metadata_rotate = metadata_rotate;
80 obj_surface->share_info->surface_protected = surface_protected;
81 obj_surface->share_info->force_output_method = force_output_method;
82 obj_surface->share_info->bob_deinterlace = bob_deinterlace;
146 object_surface_p obj_surface;
150 obj_surface = SURFACE(surfaceID);
151 if (NULL == obj_surface) {
156 MEMSET_OBJECT(obj_surface, struct object_surface_s);
158 obj_surface->surface_id = surfaceID;
160 obj_surface->context_id = -1;
161 obj_surface->width = width;
162 obj_surface->height = height;
163 obj_surface->width_r = width;
164 obj_surface->height_r = height;
165 obj_surface->height_origin = height_origin;
166 obj_surface->is_ref_surface = 0;
170 object_heap_free(&driver_data->surface_heap, (object_base_p) obj_surface);
171 obj_surface->surface_id = VA_INVALID_SURFACE;
210 obj_surface->share_info = NULL;
217 object_heap_free(&driver_data->surface_heap, (object_base_p) obj_surface);
218 obj_surface->surface_id = VA_INVALID_SURFACE;
229 obj_surface->psb_surface = psb_surface;
236 object_surface_p obj_surface = SURFACE(surface_list[i]);
237 psb__destroy_surface(driver_data, obj_surface);
306 object_surface_p obj_surface;
310 obj_surface = SURFACE(surfaceID);
311 if (NULL == obj_surface) {
316 MEMSET_OBJECT(obj_surface, struct object_surface_s);
318 obj_surface->surface_id = surfaceID;
320 obj_surface->context_id = -1;
321 obj_surface->width = width;
322 obj_surface->height = height;
323 obj_surface->width_r = width;
324 obj_surface->height_r = height;
325 obj_surface->height_origin = height_origin;
329 object_heap_free(&driver_data->surface_heap, (object_base_p) obj_surface);
330 obj_surface->surface_id = VA_INVALID_SURFACE;
379 obj_surface->share_info = NULL;
387 obj_surface->share_info = (psb_surface_share_info_t *)vaddr[GRALLOC_SUB_BUFFER1];
389 if (obj_surface->share_info->initialized != SHARE_INFO_INIT_VALUE) {
390 memset(obj_surface->share_info, 0, sizeof(struct psb_surface_share_info_s));
394 obj_surface->share_info->tiling = external_buffers->tiling;
396 obj_surface->share_info->width = obj_surface->width;
397 obj_surface->share_info->height = obj_surface->height_origin;
399 obj_surface->share_info->luma_stride = psb_surface->stride;
400 obj_surface->share_info->chroma_u_stride = psb_surface->stride;
401 obj_surface->share_info->chroma_v_stride = psb_surface->stride;
402 obj_surface->share_info->format = VA_FOURCC_NV12;
404 obj_surface->share_info->khandle = (uint32_t)(wsbmKBufHandle(wsbmKBuf(psb_surface->buf.drm_buf)));
406 obj_surface->share_info->initialized = SHARE_INFO_INIT_VALUE;
410 obj_surface->share_info->force_output_method = protected ? OUTPUT_FORCE_OVERLAY : OUTPUT_FORCE_OVERLAY_FOR_SW_DECODE;
411 obj_surface->share_info->native_window = (void *)external_buffers->reserved[0];
413 attribute_tpi->reserved[1] = (unsigned long)obj_surface->share_info;
427 obj_surface->share_info->csc_mode = (driver_data->is_BT601 == 1) ? 0 : 1;
430 obj_surface->share_info->csc_mode = 0;
434 obj_surface->share_info->video_range = driver_data->video_range;
437 obj_surface->share_info->video_range = 0;
440 obj_surface->share_info->surface_protected = driver_data->protected;
442 obj_surface->share_info->crop_width = obj_surface->share_info->width;
443 obj_surface->share_info->crop_height = obj_surface->share_info->height;
445 obj_surface->share_info->crop_width = driver_data->render_rect.width;
446 obj_surface->share_info->crop_height = driver_data->render_rect.height;
449 if (obj_surface->share_info->coded_width == 0 || obj_surface->share_info->coded_height == 0) {
450 obj_surface->share_info->coded_width = (obj_surface->share_info->width + 0xf) & ~0xf;
451 obj_surface->share_info->coded_height = (obj_surface->share_info->height + 0xf) & ~0xf;
466 object_heap_free(&driver_data->surface_heap, (object_base_p) obj_surface);
467 obj_surface->surface_id = VA_INVALID_SURFACE;
480 obj_surface->psb_surface = psb_surface;
487 object_surface_p obj_surface = SURFACE(surface_list[i]);
488 psb__destroy_surface(driver_data, obj_surface);