Lines Matching refs:video

49 /* Limits for the overlay/textured video source sizes.  The documented hardware
50 * limits are 2048x2048 or better for overlay and both of our textured video
101 static bool sna_video_overlay_update_attrs(struct sna_video *video)
108 attrs.brightness = video->brightness;
109 attrs.contrast = video->contrast;
110 attrs.saturation = video->saturation;
111 attrs.color_key = video->color_key;
112 attrs.gamma0 = video->gamma0;
113 attrs.gamma1 = video->gamma1;
114 attrs.gamma2 = video->gamma2;
115 attrs.gamma3 = video->gamma3;
116 attrs.gamma4 = video->gamma4;
117 attrs.gamma5 = video->gamma5;
119 if (video->AlwaysOnTop)
122 return drmIoctl(video->sna->kgem.fd, DRM_IOCTL_I915_OVERLAY_ATTRS, &attrs) == 0;
127 struct sna_video *video = port->devPriv.ptr;
128 struct sna *sna = video->sna;
133 REGION_EMPTY(to_screen_from_sna(sna), &video->clip);
140 if (video->bo[0])
141 kgem_bo_destroy(&sna->kgem, video->bo[0]);
142 video->bo[0] = NULL;
144 sna_video_free_buffers(video);
152 struct sna_video *video = port->devPriv.ptr;
153 struct sna *sna = video->sna;
160 video->contrast, (int)value));
161 video->brightness = value;
166 video->contrast, (int)value));
167 video->contrast = value;
172 video->saturation, (int)value));
173 video->saturation = value;
179 video->desired_crtc = NULL;
181 video->desired_crtc = xf86_config->crtc[value];
184 video->AlwaysOnTop, !!value));
185 video->AlwaysOnTop = !!value;
187 video->gamma0 = value;
189 video->gamma1 = value;
191 video->gamma2 = value;
193 video->gamma3 = value;
195 video->gamma4 = value;
197 video->gamma5 = value;
199 video->color_key = value;
200 RegionEmpty(&video->clip);
214 if (!sna_video_overlay_update_attrs(video))
223 struct sna_video *video = port->devPriv.ptr;
224 struct sna *sna = video->sna;
227 *value = video->brightness;
229 *value = video->contrast;
231 *value = video->saturation;
236 if (xf86_config->crtc[c] == video->desired_crtc)
242 *value = video->AlwaysOnTop;
244 *value = video->gamma0;
246 *value = video->gamma1;
248 *value = video->gamma2;
250 *value = video->gamma3;
252 *value = video->gamma4;
254 *value = video->gamma5;
256 *value = video->color_key;
266 struct sna_video *video = port->devPriv.ptr;
267 struct sna *sna = video->sna;
347 struct sna_video *video,
443 if (video->bo[0] != frame->bo) {
444 if (video->bo[0])
445 kgem_bo_destroy(&sna->kgem, video->bo[0]);
446 video->bo[0] = kgem_bo_reference(frame->bo);
455 struct sna_video *video = port->devPriv.ptr;
456 struct sna *sna = video->sna;
479 DBG(("%s: always_on_top=%d\n", __FUNCTION__, video->AlwaysOnTop));
480 if (!video->AlwaysOnTop) {
498 sna_video_frame_init(video, format->id, width, height, &frame);
500 if (!sna_video_clip_helper(video, &frame, &crtc, &dstBox,
510 sna_video_frame_set_rotation(video, &frame, crtc->rotation);
537 frame.bo = sna_video_buffer(video, &frame);
539 DBG(("%s: failed to allocate video bo\n", __FUNCTION__));
543 if (!sna_video_copy_data(video, &frame, buf)) {
544 DBG(("%s: failed to copy video data\n", __FUNCTION__));
551 (sna, video, &frame, crtc, &dstBox, src_w, src_h, drw_w, drw_h)) {
552 sna_video_fill_colorkey(video, &clip);
555 DBG(("%s: failed to show video frame\n", __FUNCTION__));
563 sna_video_buffer_fini(video);
569 * If the video isn't visible on any CRTC, turn it off
582 struct sna_video *video = port->devPriv.ptr;
584 struct sna *sna = video->sna;
608 sna_video_frame_init(video, format->id, *w, *h, &frame);
609 sna_video_frame_set_rotation(video, &frame, RR_Rotate_0);
692 struct sna_video *video;
707 video = calloc(1, sizeof(*video));
709 if (video == NULL || port == NULL) {
710 free(video);
763 port->devPriv.ptr = video;
765 video->sna = sna;
770 video->alignment = 512;
775 video->alignment = 256;
777 video->alignment = 64;
778 video->color_key = sna_video_overlay_color_key(sna);
779 video->brightness = -19; /* (255/219) * -16 */
780 video->contrast = 75; /* 255/219 * 64 */
781 video->saturation = 146; /* 128/112 * 128 */
782 video->desired_crtc = NULL;
783 video->gamma5 = 0xc0c0c0;
784 video->gamma4 = 0x808080;
785 video->gamma3 = 0x404040;
786 video->gamma2 = 0x202020;
787 video->gamma1 = 0x101010;
788 video->gamma0 = 0x080808;
789 RegionNull(&video->clip);
809 sna_video_overlay_update_attrs(video);