Lines Matching refs:IMAGE
59 #define IMAGE(id) ((object_image_p) object_heap_lookup( &driver_data->image_heap, id ))
220 VAImage *image,
229 /* check for image */
231 if (*src_x > image->width) *src_x = image->width - 1;
233 if (*src_y > image->height) *src_y = image->height - 1;
235 if (((*width) + (*src_x)) > image->width) *width = image->width - *src_x;
236 if (((*height) + (*src_y)) > image->height) *height = image->height - *src_x;
280 VAImage *image /* out */
297 CHECK_INVALID_PARAM(image == NULL);
300 obj_image = IMAGE(imageID);
305 obj_image->image.image_id = imageID;
306 obj_image->image.format = *img_fmt;
313 obj_image->image.width = width;
314 obj_image->image.height = height;
315 obj_image->image.data_size = pitch_pot * height /*Y*/ + 2 * (pitch_pot / 2) * (height / 2);/*UV*/
316 obj_image->image.num_planes = 2;
317 obj_image->image.pitches[0] = pitch_pot;
318 obj_image->image.pitches[1] = pitch_pot;
319 obj_image->image.offsets[0] = 0;
320 obj_image->image.offsets[1] = pitch_pot * height;
321 obj_image->image.num_palette_entries = 0;
322 obj_image->image.entry_bytes = 0;
323 obj_image->image.component_order[0] = 'Y';
324 obj_image->image.component_order[1] = 'U';/* fixed me: packed UV packed here! */
325 obj_image->image.component_order[2] = 'V';
326 obj_image->image.component_order[3] = '\0';
330 obj_image->image.width = width;
331 obj_image->image.height = height;
332 obj_image->image.data_size = 4 * pitch_pot * height;
333 obj_image->image.num_planes = 1;
334 obj_image->image.pitches[0] = 4 * pitch_pot;
335 obj_image->image.num_palette_entries = 0;
336 obj_image->image.entry_bytes = 0;
337 obj_image->image.component_order[0] = 'V';
338 obj_image->image.component_order[1] = 'U';
339 obj_image->image.component_order[2] = 'Y';
340 obj_image->image.component_order[3] = 'A';
344 obj_image->image.width = width;
345 obj_image->image.height = height;
346 obj_image->image.data_size = 4 * pitch_pot * height;
347 obj_image->image.num_planes = 1;
348 obj_image->image.pitches[0] = 4 * pitch_pot;
349 obj_image->image.num_palette_entries = 0;
350 obj_image->image.entry_bytes = 0;
351 obj_image->image.component_order[0] = 'R';
352 obj_image->image.component_order[1] = 'G';
353 obj_image->image.component_order[2] = 'B';
354 obj_image->image.component_order[3] = 'A';
358 obj_image->image.width = width;
359 obj_image->image.height = height;
360 obj_image->image.data_size = pitch_pot * height;/* one byte one element */
361 obj_image->image.num_planes = 1;
362 obj_image->image.pitches[0] = pitch_pot;
363 obj_image->image.num_palette_entries = 16;
364 obj_image->image.entry_bytes = 4; /* AYUV */
365 obj_image->image.component_order[0] = 'I';
366 obj_image->image.component_order[1] = 'A';
367 obj_image->image.component_order[2] = '\0';
368 obj_image->image.component_order[3] = '\0';
372 obj_image->image.width = width;
373 obj_image->image.height = height;
374 obj_image->image.data_size = pitch_pot * height /*Y*/ + 2 * (pitch_pot / 2) * (height / 2);/*UV*/
375 obj_image->image.num_planes = 3;
376 obj_image->image.pitches[0] = pitch_pot;
377 obj_image->image.pitches[1] = pitch_pot / 2;
378 obj_image->image.pitches[2] = pitch_pot / 2;
379 obj_image->image.offsets[0] = 0;
380 obj_image->image.offsets[1] = pitch_pot * height;
381 obj_image->image.offsets[2] = pitch_pot * height + (pitch_pot / 2) * (height / 2);
382 obj_image->image.num_palette_entries = 0;
383 obj_image->image.entry_bytes = 0;
384 obj_image->image.component_order[0] = 'Y';
385 obj_image->image.component_order[1] = 'U';
386 obj_image->image.component_order[2] = 'V';
387 obj_image->image.component_order[3] = '\0';
391 obj_image->image.width = width;
392 obj_image->image.height = height;
393 obj_image->image.data_size = 4 * pitch_pot * height;
394 obj_image->image.num_planes = 4;
395 obj_image->image.pitches[0] = pitch_pot;
396 obj_image->image.pitches[1] = pitch_pot;
397 obj_image->image.pitches[2] = pitch_pot;
398 obj_image->image.extra_pitch = pitch_pot;
399 obj_image->image.offsets[0] = 0;
400 obj_image->image.offsets[1] = pitch_pot * height;
401 obj_image->image.offsets[2] = pitch_pot * height * 2;
402 obj_image->image.extra_offset = pitch_pot * height * 3;
403 obj_image->image.num_palette_entries = 0;
404 obj_image->image.entry_bytes = 0;
405 obj_image->image.component_order[0] = 'V';
406 obj_image->image.component_order[1] = 'U';
407 obj_image->image.component_order[2] = 'Y';
408 obj_image->image.component_order[3] = 'A';
420 obj_image->image.data_size, 1, NULL, &obj_image->image.buf);
428 memcpy(image, &obj_image->image, sizeof(VAImage));
448 drv_debug_msg(VIDEO_DEBUG_ERROR, "IED is enabled, image is encrypted.\n");
462 VAImage *image /* out */
476 CHECK_INVALID_PARAM(image == NULL);
477 /* Can't derive image from reconstrued frame which is in tiled format */
507 /* create the image */
509 obj_image = IMAGE(imageID);
533 obj_image->image.image_id = imageID;
534 obj_image->image.format = psb__CreateImageFormat[fourcc_index];
537 obj_image->image.buf = bufferID;
538 obj_image->image.width = obj_surface->width;
539 obj_image->image.height = obj_surface->height;
540 obj_image->image.data_size = obj_surface->psb_surface->size;
546 obj_image->image.num_planes = 2;
547 obj_image->image.pitches[0] = obj_surface->psb_surface->stride;
548 obj_image->image.pitches[1] = obj_surface->psb_surface->stride;
550 obj_image->image.offsets[0] = srf_buf_ofs;
551 obj_image->image.offsets[1] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride;
552 obj_image->image.num_palette_entries = 0;
553 obj_image->image.entry_bytes = 0;
554 obj_image->image.component_order[0] = 'Y';
555 obj_image->image.component_order[1] = 'U';/* fixed me: packed UV packed here! */
556 obj_image->image.component_order[2] = 'V';
557 obj_image->image.component_order[3] = '\0';
561 obj_image->image.num_planes = 3;
562 obj_image->image.pitches[0] = obj_surface->psb_surface->stride;
563 obj_image->image.pitches[1] = obj_surface->psb_surface->stride / 2;
564 obj_image->image.pitches[2] = obj_surface->psb_surface->stride / 2;
566 obj_image->image.offsets[0] = srf_buf_ofs;
567 obj_image->image.offsets[1] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride;
568 obj_image->image.offsets[2] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride * 3 / 2;
569 obj_image->image.num_palette_entries = 0;
570 obj_image->image.entry_bytes = 0;
571 obj_image->image.component_order[0] = 'Y';
572 obj_image->image.component_order[1] = 'V';/* fixed me: packed UV packed here! */
573 obj_image->image.component_order[2] = 'U';
574 obj_image->image.component_order[3] = '\0';
578 obj_image->image.num_planes = 3;
579 obj_image->image.pitches[0] = obj_surface->psb_surface->stride;
580 obj_image->image.pitches[1] = obj_surface->psb_surface->stride;
581 obj_image->image.pitches[2] = obj_surface->psb_surface->stride;
583 obj_image->image.offsets[0] = srf_buf_ofs;
584 obj_image->image.offsets[1] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride;
585 obj_image->image.offsets[2] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride * 2;
586 obj_image->image.num_palette_entries = 0;
587 obj_image->image.entry_bytes = 0;
588 obj_image->image.component_order[0] = 'Y';
589 obj_image->image.component_order[1] = 'U';/* fixed me: packed UV packed here! */
590 obj_image->image.component_order[2] = 'V';
591 obj_image->image.component_order[3] = '\0';
598 obj_image->derived_surface = surface; /* this image is derived from a surface */
601 memcpy(image, &obj_image->image, sizeof(VAImage));
618 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
622 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
633 VAImageID image
640 obj_image = IMAGE(image);
647 VAImageID image,
659 object_image_p obj_image = IMAGE(image);
662 if (obj_image->image.format.fourcc != VA_FOURCC_AI44) {
668 if (obj_image->image.num_palette_entries > 16) {
669 drv_debug_msg(VIDEO_DEBUG_ERROR, "image.num_palette_entries(%d) is too big\n", obj_image->image.num_palette_entries);
672 memcpy(obj_image->palette, palette, obj_image->image.num_palette_entries * sizeof(unsigned int));
688 drv_debug_msg(VIDEO_DEBUG_GENERAL, "Unpack reconstructed frame to image\n");
865 object_image_p obj_image = IMAGE(image_id);
873 if (obj_image->image.format.fourcc != VA_FOURCC_NV12) {
882 psb__VAImageCheckRegion(obj_surface, &obj_image->image, &src_x, &src_y, &dest_x, &dest_y,
892 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
908 switch (obj_image->image.format.fourcc) {
923 dst_u = image_data + obj_image->image.offsets[1],
929 obj_image->image.pitches[0], \
930 obj_image->image.width / 2, \
931 obj_image->image.width / 2, \
937 dst_u = image_data + obj_image->image.offsets[1];
942 obj_image->image.pitches[0], \
943 obj_image->image.pitches[1], \
944 obj_image->image.pitches[1], \
952 dst_y += obj_image->image.pitches[0];
957 dst_uv = image_data + obj_image->image.offsets[1];
959 for (i = 0; i < obj_image->image.height / 2; i++) {
961 dst_uv += obj_image->image.pitches[1];
975 image.offsets[0] + src_y * obj_image->image.pitches[0] + src_x;
976 dst_u = image_data + obj_image->image.offsets[1] + src_y * obj_image->image.pitches[1] + src_x;
977 dst_v = image_data + obj_image->image.offsets[2] + src_y * obj_image->image.pitches[2] + src_x;
985 obj_image->image.pitches[0],
986 obj_image->image.pitches[1],
987 obj_image->image.pitches[2],
1019 object_image_p obj_image = IMAGE(image_id);
1025 if (obj_image->image.format.fourcc != VA_FOURCC_NV12) {
1031 psb__VAImageCheckRegion(obj_surface, &obj_image->image, &src_x, &src_y, &dest_x, &dest_y,
1041 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
1053 switch (obj_image->image.format.fourcc) {
1059 source_y = image_data + obj_image->image.offsets[0] + src_y * obj_image->image.pitches[0] + src_x;
1063 source_y += obj_image->image.pitches[0];
1068 src_uv = image_data + obj_image->image.offsets[1] + (src_y / 2) * obj_image->image.pitches[1] + src_x;
1070 for (i = 0; i < obj_image->image.height / 2; i++) {
1072 src_uv += obj_image->image.pitches[1];
1084 source_y = image_data + obj_image->image.offsets[0] + src_y * obj_image->image.pitches[0] + src_x;
1085 source_u = image_data + obj_image->image.offsets[1] + src_y * obj_image->image.pitches[1] + src_x;
1086 source_v = image_data + obj_image->image.offsets[2] + src_y * obj_image->image.pitches[2] + src_x;
1097 source_y += obj_image->image.pitches[0];
1102 for (i = 0; i < obj_image->image.height / 2; i++) {
1106 source_u += obj_image->image.pitches[1];
1107 source_v += obj_image->image.pitches[2];
1128 VAImage *image,
1139 /* check for image */
1141 if (*src_x > image->width) *src_x = image->width - 1;
1143 if (*src_y > image->height) *src_y = image->height - 1;
1145 if (((*src_width) + (*src_x)) > image->width) *src_width = image->width - *src_x;
1146 if (((*src_height) + (*src_y)) > image->height) *src_height = image->height - *src_x;
1185 object_image_p obj_image = IMAGE(image_id);
1188 if (obj_image->image.format.fourcc != VA_FOURCC_NV12) {
1197 psb__VAImageCheckRegion2(obj_surface, &obj_image->image,
1208 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
1219 switch (obj_image->image.format.fourcc) {
1240 source_y = image_data + obj_image->image.offsets[0]
1241 + (src_y + y) * obj_image->image.pitches[0]
1247 source_uv = (unsigned short *)(image_data + obj_image->image.offsets[1]
1248 + ((src_y + y) / 2) * obj_image->image.pitches[1])
1274 * The image informatio and its BO of subpicture will copied to surface
1293 object_image_p obj_image = IMAGE(obj_subpic->image_id);
1298 VAImage *image = &obj_image->image;
1299 object_buffer_p obj_buffer = BUFFER(image->buf);
1329 surface_subpic->fourcc = image->format.fourcc;
1330 surface_subpic->size = image->data_size;
1336 surface_subpic->width = image->width;
1337 surface_subpic->height = image->height;
1340 surface_subpic->stride = image->pitches[0] / 4;
1343 surface_subpic->stride = image->pitches[0] / 4;
1346 surface_subpic->stride = image->pitches[0];
1347 /* point to Image palette */
1506 VAImageID image,
1517 obj_image = IMAGE(image);
1521 img_fmt = psb__VAImageCheckFourCC(&obj_image->image.format, psb__SubpicFormat,
1533 obj_subpic->image_id = obj_image->image.image_id;
1587 VAImageID image
1597 obj_image = IMAGE(image);
1600 img_fmt = psb__VAImageCheckFourCC(&obj_image->image.format,
1608 object_image_p old_obj_image = IMAGE(obj_subpic->image_id);
1613 /* reset the image */
1614 obj_subpic->image_id = obj_image->image.image_id;
1827 obj_image = IMAGE(obj_subpic->image_id);