Lines Matching refs:IMAGE
60 #define IMAGE(id) ((object_image_p) object_heap_lookup( &driver_data->image_heap, id ))
221 VAImage *image,
230 /* check for image */
232 if (*src_x > image->width) *src_x = image->width - 1;
234 if (*src_y > image->height) *src_y = image->height - 1;
236 if (((*width) + (*src_x)) > image->width) *width = image->width - *src_x;
237 if (((*height) + (*src_y)) > image->height) *height = image->height - *src_x;
281 VAImage *image /* out */
298 CHECK_INVALID_PARAM(image == NULL);
301 obj_image = IMAGE(imageID);
306 obj_image->image.image_id = imageID;
307 obj_image->image.format = *img_fmt;
314 obj_image->image.width = width;
315 obj_image->image.height = height;
316 obj_image->image.data_size = pitch_pot * height /*Y*/ + 2 * (pitch_pot / 2) * (height / 2);/*UV*/
317 obj_image->image.num_planes = 2;
318 obj_image->image.pitches[0] = pitch_pot;
319 obj_image->image.pitches[1] = pitch_pot;
320 obj_image->image.offsets[0] = 0;
321 obj_image->image.offsets[1] = pitch_pot * height;
322 obj_image->image.num_palette_entries = 0;
323 obj_image->image.entry_bytes = 0;
324 obj_image->image.component_order[0] = 'Y';
325 obj_image->image.component_order[1] = 'U';/* fixed me: packed UV packed here! */
326 obj_image->image.component_order[2] = 'V';
327 obj_image->image.component_order[3] = '\0';
331 obj_image->image.width = width;
332 obj_image->image.height = height;
333 obj_image->image.data_size = 4 * pitch_pot * height;
334 obj_image->image.num_planes = 1;
335 obj_image->image.pitches[0] = 4 * pitch_pot;
336 obj_image->image.num_palette_entries = 0;
337 obj_image->image.entry_bytes = 0;
338 obj_image->image.component_order[0] = 'V';
339 obj_image->image.component_order[1] = 'U';
340 obj_image->image.component_order[2] = 'Y';
341 obj_image->image.component_order[3] = 'A';
345 obj_image->image.width = width;
346 obj_image->image.height = height;
347 obj_image->image.data_size = 4 * pitch_pot * height;
348 obj_image->image.num_planes = 1;
349 obj_image->image.pitches[0] = 4 * pitch_pot;
350 obj_image->image.num_palette_entries = 0;
351 obj_image->image.entry_bytes = 0;
352 obj_image->image.component_order[0] = 'R';
353 obj_image->image.component_order[1] = 'G';
354 obj_image->image.component_order[2] = 'B';
355 obj_image->image.component_order[3] = 'A';
359 obj_image->image.width = width;
360 obj_image->image.height = height;
361 obj_image->image.data_size = pitch_pot * height;/* one byte one element */
362 obj_image->image.num_planes = 1;
363 obj_image->image.pitches[0] = pitch_pot;
364 obj_image->image.num_palette_entries = 16;
365 obj_image->image.entry_bytes = 4; /* AYUV */
366 obj_image->image.component_order[0] = 'I';
367 obj_image->image.component_order[1] = 'A';
368 obj_image->image.component_order[2] = '\0';
369 obj_image->image.component_order[3] = '\0';
373 obj_image->image.width = width;
374 obj_image->image.height = height;
375 obj_image->image.data_size = pitch_pot * height /*Y*/ + 2 * (pitch_pot / 2) * (height / 2);/*UV*/
376 obj_image->image.num_planes = 3;
377 obj_image->image.pitches[0] = pitch_pot;
378 obj_image->image.pitches[1] = pitch_pot / 2;
379 obj_image->image.pitches[2] = pitch_pot / 2;
380 obj_image->image.offsets[0] = 0;
381 obj_image->image.offsets[1] = pitch_pot * height;
382 obj_image->image.offsets[2] = pitch_pot * height + (pitch_pot / 2) * (height / 2);
383 obj_image->image.num_palette_entries = 0;
384 obj_image->image.entry_bytes = 0;
385 obj_image->image.component_order[0] = 'Y';
386 obj_image->image.component_order[1] = 'U';
387 obj_image->image.component_order[2] = 'V';
388 obj_image->image.component_order[3] = '\0';
392 obj_image->image.width = width;
393 obj_image->image.height = height;
394 obj_image->image.data_size = 4 * pitch_pot * height;
395 obj_image->image.num_planes = 4;
396 obj_image->image.pitches[0] = pitch_pot;
397 obj_image->image.pitches[1] = pitch_pot;
398 obj_image->image.pitches[2] = pitch_pot;
399 obj_image->image.extra_pitch = pitch_pot;
400 obj_image->image.offsets[0] = 0;
401 obj_image->image.offsets[1] = pitch_pot * height;
402 obj_image->image.offsets[2] = pitch_pot * height * 2;
403 obj_image->image.extra_offset = pitch_pot * height * 3;
404 obj_image->image.num_palette_entries = 0;
405 obj_image->image.entry_bytes = 0;
406 obj_image->image.component_order[0] = 'V';
407 obj_image->image.component_order[1] = 'U';
408 obj_image->image.component_order[2] = 'Y';
409 obj_image->image.component_order[3] = 'A';
421 obj_image->image.data_size, 1, NULL, &obj_image->image.buf);
429 memcpy(image, &obj_image->image, sizeof(VAImage));
449 drv_debug_msg(VIDEO_DEBUG_ERROR, "IED is enabled, image is encrypted.\n");
463 VAImage *image /* out */
477 CHECK_INVALID_PARAM(image == NULL);
478 /* Can't derive image from reconstrued frame which is in tiled format */
508 /* create the image */
510 obj_image = IMAGE(imageID);
534 obj_image->image.image_id = imageID;
535 obj_image->image.format = psb__CreateImageFormat[fourcc_index];
538 obj_image->image.buf = bufferID;
539 obj_image->image.width = obj_surface->width;
540 obj_image->image.height = obj_surface->height;
541 obj_image->image.data_size = obj_surface->psb_surface->size;
547 obj_image->image.num_planes = 2;
548 obj_image->image.pitches[0] = obj_surface->psb_surface->stride;
549 obj_image->image.pitches[1] = obj_surface->psb_surface->stride;
551 obj_image->image.offsets[0] = srf_buf_ofs;
552 obj_image->image.offsets[1] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride;
553 obj_image->image.num_palette_entries = 0;
554 obj_image->image.entry_bytes = 0;
555 obj_image->image.component_order[0] = 'Y';
556 obj_image->image.component_order[1] = 'U';/* fixed me: packed UV packed here! */
557 obj_image->image.component_order[2] = 'V';
558 obj_image->image.component_order[3] = '\0';
562 obj_image->image.num_planes = 3;
563 obj_image->image.pitches[0] = obj_surface->psb_surface->stride;
564 obj_image->image.pitches[1] = obj_surface->psb_surface->stride / 2;
565 obj_image->image.pitches[2] = obj_surface->psb_surface->stride / 2;
567 obj_image->image.offsets[0] = srf_buf_ofs;
568 obj_image->image.offsets[1] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride;
569 obj_image->image.offsets[2] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride * 3 / 2;
570 obj_image->image.num_palette_entries = 0;
571 obj_image->image.entry_bytes = 0;
572 obj_image->image.component_order[0] = 'Y';
573 obj_image->image.component_order[1] = 'V';/* fixed me: packed UV packed here! */
574 obj_image->image.component_order[2] = 'U';
575 obj_image->image.component_order[3] = '\0';
579 obj_image->image.num_planes = 3;
580 obj_image->image.pitches[0] = obj_surface->psb_surface->stride;
581 obj_image->image.pitches[1] = obj_surface->psb_surface->stride;
582 obj_image->image.pitches[2] = obj_surface->psb_surface->stride;
584 obj_image->image.offsets[0] = srf_buf_ofs;
585 obj_image->image.offsets[1] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride;
586 obj_image->image.offsets[2] = srf_buf_ofs + obj_surface->height * obj_surface->psb_surface->stride * 2;
587 obj_image->image.num_palette_entries = 0;
588 obj_image->image.entry_bytes = 0;
589 obj_image->image.component_order[0] = 'Y';
590 obj_image->image.component_order[1] = 'U';/* fixed me: packed UV packed here! */
591 obj_image->image.component_order[2] = 'V';
592 obj_image->image.component_order[3] = '\0';
599 obj_image->derived_surface = surface; /* this image is derived from a surface */
602 memcpy(image, &obj_image->image, sizeof(VAImage));
619 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
623 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
634 VAImageID image
641 obj_image = IMAGE(image);
648 VAImageID image,
660 object_image_p obj_image = IMAGE(image);
663 if (obj_image->image.format.fourcc != VA_FOURCC_AI44) {
669 if (obj_image->image.num_palette_entries > 16) {
670 drv_debug_msg(VIDEO_DEBUG_ERROR, "image.num_palette_entries(%d) is too big\n", obj_image->image.num_palette_entries);
673 memcpy(obj_image->palette, palette, obj_image->image.num_palette_entries * sizeof(unsigned int));
689 drv_debug_msg(VIDEO_DEBUG_GENERAL, "Unpack reconstructed frame to image\n");
866 object_image_p obj_image = IMAGE(image_id);
874 if (obj_image->image.format.fourcc != VA_FOURCC_NV12) {
883 psb__VAImageCheckRegion(obj_surface, &obj_image->image, &src_x, &src_y, &dest_x, &dest_y,
893 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
909 switch (obj_image->image.format.fourcc) {
924 dst_u = image_data + obj_image->image.offsets[1],
930 obj_image->image.pitches[0], \
931 obj_image->image.width / 2, \
932 obj_image->image.width / 2, \
938 dst_u = image_data + obj_image->image.offsets[1];
943 obj_image->image.pitches[0], \
944 obj_image->image.pitches[1], \
945 obj_image->image.pitches[1], \
953 dst_y += obj_image->image.pitches[0];
958 dst_uv = image_data + obj_image->image.offsets[1];
960 for (i = 0; i < obj_image->image.height / 2; i++) {
962 dst_uv += obj_image->image.pitches[1];
976 image.offsets[0] + src_y * obj_image->image.pitches[0] + src_x;
977 dst_u = image_data + obj_image->image.offsets[1] + src_y * obj_image->image.pitches[1] + src_x;
978 dst_v = image_data + obj_image->image.offsets[2] + src_y * obj_image->image.pitches[2] + src_x;
986 obj_image->image.pitches[0],
987 obj_image->image.pitches[1],
988 obj_image->image.pitches[2],
1020 object_image_p obj_image = IMAGE(image_id);
1026 if (obj_image->image.format.fourcc != VA_FOURCC_NV12) {
1032 psb__VAImageCheckRegion(obj_surface, &obj_image->image, &src_x, &src_y, &dest_x, &dest_y,
1042 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
1054 switch (obj_image->image.format.fourcc) {
1060 source_y = image_data + obj_image->image.offsets[0] + src_y * obj_image->image.pitches[0] + src_x;
1064 source_y += obj_image->image.pitches[0];
1069 src_uv = image_data + obj_image->image.offsets[1] + (src_y / 2) * obj_image->image.pitches[1] + src_x;
1071 for (i = 0; i < obj_image->image.height / 2; i++) {
1073 src_uv += obj_image->image.pitches[1];
1085 source_y = image_data + obj_image->image.offsets[0] + src_y * obj_image->image.pitches[0] + src_x;
1086 source_u = image_data + obj_image->image.offsets[1] + src_y * obj_image->image.pitches[1] + src_x;
1087 source_v = image_data + obj_image->image.offsets[2] + src_y * obj_image->image.pitches[2] + src_x;
1098 source_y += obj_image->image.pitches[0];
1103 for (i = 0; i < obj_image->image.height / 2; i++) {
1107 source_u += obj_image->image.pitches[1];
1108 source_v += obj_image->image.pitches[2];
1129 VAImage *image,
1140 /* check for image */
1142 if (*src_x > image->width) *src_x = image->width - 1;
1144 if (*src_y > image->height) *src_y = image->height - 1;
1146 if (((*src_width) + (*src_x)) > image->width) *src_width = image->width - *src_x;
1147 if (((*src_height) + (*src_y)) > image->height) *src_height = image->height - *src_x;
1186 object_image_p obj_image = IMAGE(image_id);
1189 if (obj_image->image.format.fourcc != VA_FOURCC_NV12) {
1198 psb__VAImageCheckRegion2(obj_surface, &obj_image->image,
1209 object_buffer_p obj_buffer = BUFFER(obj_image->image.buf);
1220 switch (obj_image->image.format.fourcc) {
1241 source_y = image_data + obj_image->image.offsets[0]
1242 + (src_y + y) * obj_image->image.pitches[0]
1248 source_uv = (unsigned short *)(image_data + obj_image->image.offsets[1]
1249 + ((src_y + y) / 2) * obj_image->image.pitches[1])
1275 * The image informatio and its BO of subpicture will copied to surface
1294 object_image_p obj_image = IMAGE(obj_subpic->image_id);
1299 VAImage *image = &obj_image->image;
1300 object_buffer_p obj_buffer = BUFFER(image->buf);
1330 surface_subpic->fourcc = image->format.fourcc;
1331 surface_subpic->size = image->data_size;
1337 surface_subpic->width = image->width;
1338 surface_subpic->height = image->height;
1341 surface_subpic->stride = image->pitches[0] / 4;
1344 surface_subpic->stride = image->pitches[0] / 4;
1347 surface_subpic->stride = image->pitches[0];
1348 /* point to Image palette */
1507 VAImageID image,
1518 obj_image = IMAGE(image);
1522 img_fmt = psb__VAImageCheckFourCC(&obj_image->image.format, psb__SubpicFormat,
1534 obj_subpic->image_id = obj_image->image.image_id;
1588 VAImageID image
1598 obj_image = IMAGE(image);
1601 img_fmt = psb__VAImageCheckFourCC(&obj_image->image.format,
1609 object_image_p old_obj_image = IMAGE(obj_subpic->image_id);
1614 /* reset the image */
1615 obj_subpic->image_id = obj_image->image.image_id;
1828 obj_image = IMAGE(obj_subpic->image_id);