Lines Matching refs:frame

282 		      struct sna_video_frame *frame,
350 if (frame->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
351 int tmp = frame->width;
352 frame->width = frame->height;
353 frame->height = tmp;
356 if (frame->bo->delta == 0) {
371 f.width = frame->width;
372 f.height = frame->height;
375 switch (frame->bo->tiling) {
388 if (is_nv12_fourcc(frame->id)) {
389 f.handles[0] = frame->bo->handle;
390 f.handles[1] = frame->bo->handle;
391 f.pitches[0] = frame->pitch[1];
392 f.pitches[1] = frame->pitch[0];
394 f.offsets[1] = frame->UBufOffset;
396 f.handles[0] = frame->bo->handle;
397 f.pitches[0] = frame->pitch[0];
400 switch (frame->id) {
426 __FUNCTION__, frame->bo->handle, frame->width, frame->height,
436 frame->bo->delta = f.fb_id;
438 frame->bo->scanout = true;
440 frame->bo->purged = purged;
443 assert(frame->bo->scanout);
444 assert(frame->bo->delta);
447 s.fb_id = frame->bo->delta;
455 s.src_w = (frame->image.x2 - frame->image.x1) << 16;
456 s.src_h = (frame->image.y2 - frame->image.y1) << 16;
459 __FUNCTION__, s.crtc_id, s.plane_id, frame->bo->handle, s.fb_id,
472 __kgem_bo_clear_dirty(frame->bo);
476 video->bo[pipe] = kgem_bo_reference(frame->bo);
480 static bool need_scaling(const struct sna_video_frame *frame,
484 return frame->id == FOURCC_NV12 ||
485 frame->src.x2 - frame->src.x1 != dst->x2 - dst->x1 ||
486 frame->src.y2 - frame->src.y1 != dst->y2 - dst->y1;
525 struct sna_video_frame frame;
537 sna_video_frame_init(video, format->id, width, height, &frame);
563 &reg, frame.width, frame.height);
568 frame.src.x1 = x1 >> 16;
569 frame.src.y1 = y1 >> 16;
570 frame.src.x2 = (x2 + 0xffff) >> 16;
571 frame.src.y2 = (y2 + 0xffff) >> 16;
573 frame.image.x1 = frame.src.x1 & ~1;
574 frame.image.x2 = ALIGN(frame.src.x2, 2);
575 if (is_planar_fourcc(frame.id)) {
576 frame.image.y1 = frame.src.y1 & ~1;
577 frame.image.y2 = ALIGN(frame.src.y2, 2);
579 frame.image.y1 = frame.src.y1;
580 frame.image.y2 = frame.src.y2;
589 sna_video_frame_set_rotation(video, &frame, rotation);
598 frame.bo = kgem_create_for_name(&sna->kgem, *(uint32_t*)buf);
599 if (frame.bo == NULL) {
604 if (kgem_bo_size(frame.bo) < frame.size) {
606 __FUNCTION__, kgem_bo_size(frame.bo), frame.size));
607 kgem_bo_destroy(&sna->kgem, frame.bo);
612 frame.image.x1 = 0;
613 frame.image.y1 = 0;
614 frame.image.x2 = frame.width;
615 frame.image.y2 = frame.height;
619 frame.bo = sna_video_buffer(video, &frame);
620 if (frame.bo == NULL) {
626 if (!sna_video_copy_data(video, &frame, buf)) {
636 need_scaling(&frame, &dst)) {
648 frame.src.x2 - frame.src.x1,
649 frame.src.y2 - frame.src.y1,
662 if (!sna->render.video(sna, video, &frame, &r, scaled)) {
671 kgem_bo_destroy(&sna->kgem, frame.bo);
673 frame.bo = kgem_bo_reference(__sna_pixmap_get_bo(scaled));
674 kgem_bo_submit(&sna->kgem, frame.bo);
676 frame.id = FOURCC_RGB888;
677 frame.src = frame.image = r.extents;
678 frame.width = frame.image.x2;
679 frame.height = frame.image.y2;
680 frame.pitch[0] = frame.bo->pitch;
687 if (!sna_video_sprite_show(sna, video, &frame, crtc, &dst)) {
688 DBG(("%s: failed to show video frame\n", __FUNCTION__));
695 kgem_bo_destroy(&sna->kgem, frame.bo);
724 struct sna_video_frame frame;
739 sna_video_frame_init(video, format->id, *w, *h, &frame);
740 sna_video_frame_set_rotation(video, &frame, RR_Rotate_0);
741 pitches[0] = frame.pitch[0];