| 1 | /*************************************************************************** |
| 2 | |
| 3 | Copyright 2000-2011 Intel Corporation. All Rights Reserved. |
| 4 | |
| 5 | Permission is hereby granted, free of charge, to any person obtaining a |
| 6 | copy of this software and associated documentation files (the |
| 7 | "Software"), to deal in the Software without restriction, including |
| 8 | without limitation the rights to use, copy, modify, merge, publish, |
| 9 | distribute, sub license, and/or sell copies of the Software, and to |
| 10 | permit persons to whom the Software is furnished to do so, subject to |
| 11 | the following conditions: |
| 12 | |
| 13 | The above copyright notice and this permission notice (including the |
| 14 | next paragraph) shall be included in all copies or substantial portions |
| 15 | of the Software. |
| 16 | |
| 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 18 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
| 20 | IN NO EVENT SHALL INTEL, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, |
| 21 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
| 22 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR |
| 23 | THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 24 | |
| 25 | **************************************************************************/ |
| 26 | |
| 27 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:410:9`! |
| 28 | #include "config.h"cxx . . $ `<file>/config.h`/ |
| 29 | #endif |
| 30 | |
| 31 | #include "sna.h"cxx . . $ `<file>/src/sna/sna.h`/ |
| 32 | #include "sna_video.h"cxx . . $ `<file>/src/sna/sna_video.h`/ |
| 33 | |
| 34 | #include "intel_options.h"cxx . . $ `<file>/src/intel_options.h`/ |
| 35 | |
| 36 | #include <xf86drm.h> |
| 37 | #include <xf86xv.h> |
| 38 | #include <xf86Crtc.h> |
| 39 | #include <X11/extensions/Xv.h> |
| 40 | #include <fourcc.h> |
| 41 | #include <i915_drm.h> |
| 42 | #include <errno.h> |
| 43 | |
| 44 | #define fourcc_codecxx . . $ `src/sna/sna_video_sprite.c:44:9`!(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) |
| 45 | #define DRM_FORMAT_RGB565cxx . . $ `src/sna/sna_video_sprite.c:45:9`! fourcc_codecxx . . $ `src/sna/sna_video_sprite.c:44:9`!('R', 'G', '1', '6') /* [15:0] R:G:B 5:6:5 little endian */ |
| 46 | #define DRM_FORMAT_XRGB8888cxx . . $ `src/sna/sna_video_sprite.c:46:9`! fourcc_codecxx . . $ `src/sna/sna_video_sprite.c:44:9`!('X', 'R', '2', '4') /* [31:0] x:R:G:B 8:8:8:8 little endian */ |
| 47 | #define DRM_FORMAT_YUYVcxx . . $ `src/sna/sna_video_sprite.c:47:9`! fourcc_codecxx . . $ `src/sna/sna_video_sprite.c:44:9`!('Y', 'U', 'Y', 'V') /* [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian */ |
| 48 | #define DRM_FORMAT_UYVYcxx . . $ `src/sna/sna_video_sprite.c:48:9`! fourcc_codecxx . . $ `src/sna/sna_video_sprite.c:44:9`!('U', 'Y', 'V', 'Y') /* [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian */ |
| 49 | #define DRM_FORMAT_NV12cxx . . $ `src/sna/sna_video_sprite.c:49:9`! fourcc_codecxx . . $ `src/sna/sna_video_sprite.c:44:9`!('N', 'V', '1', '2') /* 2x2 subsampled Cr:Cb plane */ |
| 50 | #define DRM_FORMAT_XYUV8888cxx . . $ `src/sna/sna_video_sprite.c:50:9`! fourcc_codecxx . . $ `src/sna/sna_video_sprite.c:44:9`!('X', 'Y', 'U', 'V') /* [31:0] x:Y:U:V 8:8:8:8 little endian */ |
| 51 | |
| 52 | #define has_hw_scalingcxx . . $ `src/sna/sna_video_sprite.c:52:9`!(sna, video) ((sna)->kgem.gen < 071 || \ |
| 53 | (sna)->kgem.gen >= 0110) |
| 54 | |
| 55 | #define LOCAL_IOCTL_MODE_SETPLANEcxx . . $ `src/sna/sna_video_sprite.c:55:9`! DRM_IOWRcxx . . $ `<external>/17113187487313021854/drm.h:1092:9`!(0xB7, struct local_mode_set_plane) |
| 56 | struct local_mode_set_planecxx . . $ local_mode_set_plane# { |
| 57 | uint32_tcxx . . $ uint32_t# plane_idcxx . . $ local_mode_set_plane#plane_id.; |
| 58 | uint32_tcxx . . $ uint32_t# crtc_idcxx . . $ local_mode_set_plane#crtc_id.; |
| 59 | uint32_tcxx . . $ uint32_t# fb_idcxx . . $ local_mode_set_plane#fb_id.; /* fb object contains surface format type */ |
| 60 | uint32_tcxx . . $ uint32_t# flagscxx . . $ local_mode_set_plane#flags.; |
| 61 | |
| 62 | /* Signed dest location allows it to be partially off screen */ |
| 63 | int32_tcxx . . $ int32_t# crtc_xcxx . . $ local_mode_set_plane#crtc_x., crtc_ycxx . . $ local_mode_set_plane#crtc_y.; |
| 64 | uint32_tcxx . . $ uint32_t# crtc_wcxx . . $ local_mode_set_plane#crtc_w., crtc_hcxx . . $ local_mode_set_plane#crtc_h.; |
| 65 | |
| 66 | /* Source values are 16.16 fixed point */ |
| 67 | uint32_tcxx . . $ uint32_t# src_xcxx . . $ local_mode_set_plane#src_x., src_ycxx . . $ local_mode_set_plane#src_y.; |
| 68 | uint32_tcxx . . $ uint32_t# src_hcxx . . $ local_mode_set_plane#src_h., src_wcxx . . $ local_mode_set_plane#src_w.; |
| 69 | }; |
| 70 | |
| 71 | #define MAKE_ATOMcxx . . $ `src/sna/sna_video_sprite.c:71:9`!(a) MakeAtom(a, sizeof(a) - 1, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!) |
| 72 | |
| 73 | static Atomcxx . . $ Atom# xvColorKeycxx . . $ xvColorKey., xvAlwaysOnTopcxx . . $ xvAlwaysOnTop., xvSyncToVblankcxx . . $ xvSyncToVblank., xvColorspacecxx . . $ xvColorspace.; |
| 74 | |
| 75 | static XvFormatReccxx . . $ XvFormatRec# formatscxx . . $ formats.[] = { |
| 76 | { .depth = 8, }, |
| 77 | { .depth = 15, }, |
| 78 | { .depth = 16, }, |
| 79 | { .depth = 24, }, |
| 80 | { .depth = 30, }, |
| 81 | }; |
| 82 | static const XvImageReccxx . . $ XvImageRec# imagescxx . . $ images.[] = { XVIMAGE_YUY2cxx . . $ `<external>/5950719045248363523/fourcc.h:40:9`!, XVIMAGE_UYVYcxx . . $ `<external>/5950719045248363523/fourcc.h:100:9`!, |
| 83 | XVMC_RGB888cxx . . $ `src/sna/sna_video.h:66:9`! }; |
| 84 | static const XvImageReccxx . . $ XvImageRec# images_rgb565cxx . . $ images_rgb565.[] = { XVIMAGE_YUY2cxx . . $ `<external>/5950719045248363523/fourcc.h:40:9`!, XVIMAGE_UYVYcxx . . $ `<external>/5950719045248363523/fourcc.h:100:9`!, |
| 85 | XVMC_RGB888cxx . . $ `src/sna/sna_video.h:66:9`!, XVMC_RGB565cxx . . $ `src/sna/sna_video.h:58:9`! }; |
| 86 | static const XvImageReccxx . . $ XvImageRec# images_nv12cxx . . $ images_nv12.[] = { XVIMAGE_YUY2cxx . . $ `<external>/5950719045248363523/fourcc.h:40:9`!, XVIMAGE_UYVYcxx . . $ `<external>/5950719045248363523/fourcc.h:100:9`!, |
| 87 | XVIMAGE_NV12cxx . . $ `src/sna/sna_video.h:75:9`!, XVMC_RGB888cxx . . $ `src/sna/sna_video.h:66:9`!, XVMC_RGB565cxx . . $ `src/sna/sna_video.h:58:9`! }; |
| 88 | static const XvImageReccxx . . $ XvImageRec# images_ayuvcxx . . $ images_ayuv.[] = { XVIMAGE_AYUVcxx . . $ `src/sna/sna_video.h:83:9`!, XVIMAGE_YUY2cxx . . $ `<external>/5950719045248363523/fourcc.h:40:9`!, XVIMAGE_UYVYcxx . . $ `<external>/5950719045248363523/fourcc.h:100:9`!, |
| 89 | XVIMAGE_NV12cxx . . $ `src/sna/sna_video.h:75:9`!, XVMC_RGB888cxx . . $ `src/sna/sna_video.h:66:9`!, XVMC_RGB565cxx . . $ `src/sna/sna_video.h:58:9`! }; |
| 90 | static const XvAttributeReccxx . . $ XvAttributeRec# attribscxx . . $ attribs.[] = { |
| 91 | { XvSettablecxx . . $ `<external>/9680055043540666286/Xv.h:74:9`! | XvGettablecxx . . $ `<external>/9680055043540666286/Xv.h:73:9`!, 0, 1, (char *)"XV_COLORSPACE" }, /* BT.601, BT.709 */ |
| 92 | { XvSettablecxx . . $ `<external>/9680055043540666286/Xv.h:74:9`! | XvGettablecxx . . $ `<external>/9680055043540666286/Xv.h:73:9`!, 0, 0xffffff, (char *)"XV_COLORKEY" }, |
| 93 | { XvSettablecxx . . $ `<external>/9680055043540666286/Xv.h:74:9`! | XvGettablecxx . . $ `<external>/9680055043540666286/Xv.h:73:9`!, 0, 1, (char *)"XV_ALWAYS_ON_TOP" }, |
| 94 | }; |
| 95 | |
| 96 | static int sna_video_sprite_stopcxx . . $ sna_video_sprite_stop(49a0fca2bc73e33a).(ddStopVideo_ARGScxx . . $ `src/compat-api.h:219:9`!) |
| 97 | { |
| 98 | struct sna_videocxx . . $ sna_video# *video = port->devPrivcxx . . $ _XvPortRec#devPriv..ptrcxx . . $ _DevUnion#ptr.; |
| 99 | struct local_mode_set_planecxx . . $ local_mode_set_plane# s; |
| 100 | xf86CrtcConfigPtrcxx . . $ xf86CrtcConfigPtr# config = XF86_CRTC_CONFIG_PTRcxx . . $ `<external>/4565256951739191595/xf86Crtc.h:835:9`!(video->sna->scrn); |
| 101 | int i; |
| 102 | |
| 103 | for (i = 0; i < video->snacxx . . $ sna_video#sna.->modecxx . . $ sna#mode..num_real_crtccxx . . $ sna_mode#num_real_crtc.; i++) { |
| 104 | xf86CrtcPtrcxx . . $ xf86CrtcPtr# crtc = config->crtccxx . . $ _xf86CrtcConfig#crtc.[i]; |
| 105 | int pipe; |
| 106 | |
| 107 | pipe = sna_crtc_pipecxx . . $ sna_crtc_pipe(9e8e77c59c01f4fb).(crtc); |
| 108 | assertcxx . . $ `/usr/include/assert.h:50:10`!(pipe < ARRAY_SIZE(video->bo)); |
| 109 | if (video->bocxx . . $ sna_video#bo.[pipe] == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 110 | continue; |
| 111 | |
| 112 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&s, 0, sizeof(s)); |
| 113 | s.plane_idcxx . . $ local_mode_set_plane#plane_id. = sna_crtc_to_spritecxx . . $ sna_crtc_to_sprite(3cdcb1ad855bee97).(crtc, video->idxcxx . . $ sna_video#idx.); |
| 114 | if (drmIoctlcxx . . $ drmIoctl(abf9bb955e3c4896).(video->snacxx . . $ sna_video#sna.->kgemcxx . . $ sna#kgem..fdcxx . . $ kgem#fd., LOCAL_IOCTL_MODE_SETPLANEcxx . . $ `src/sna/sna_video_sprite.c:55:9`!, &s)) |
| 115 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(video->snacxx . . $ sna_video#sna.->scrncxx . . $ sna#scrn.->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 116 | "failed to disable plane\n"); |
| 117 | |
| 118 | if (video->bocxx . . $ sna_video#bo.[pipe]) |
| 119 | kgem_bo_destroycxx . . $ kgem_bo_destroy(acb82a203cb9de7a).(&video->snacxx . . $ sna_video#sna.->kgemcxx . . $ sna#kgem., video->bocxx . . $ sna_video#bo.[pipe]); |
| 120 | video->bocxx . . $ sna_video#bo.[pipe] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 121 | } |
| 122 | |
| 123 | sna_window_set_portcxx . . $ sna_window_set_port(9f735827aa970ebc).((WindowPtrcxx . . $ WindowPtr#)draw, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 124 | |
| 125 | return Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!; |
| 126 | } |
| 127 | |
| 128 | static int sna_video_sprite_set_attrcxx . . $ sna_video_sprite_set_attr(9b5cbc7354500ffd).(ddSetPortAttribute_ARGScxx . . $ `src/compat-api.h:220:9`!) |
| 129 | { |
| 130 | struct sna_videocxx . . $ sna_video# *video = port->devPrivcxx . . $ _XvPortRec#devPriv..ptrcxx . . $ _DevUnion#ptr.; |
| 131 | |
| 132 | if (attribute == xvColorKeycxx . . $ xvColorKey.) { |
| 133 | video->color_key_changedcxx . . $ sna_video#color_key_changed. = ~0; |
| 134 | video->color_keycxx . . $ sna_video#color_key. = value; |
| 135 | RegionEmptycxx . . $ RegionEmpty(353c1b2f50b7675c).(&video->clipcxx . . $ sna_video#clip.); |
| 136 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("COLORKEY = %ld\n", (long)value)); |
| 137 | } else if (attribute == xvColorspacecxx . . $ xvColorspace.) { |
| 138 | video->colorspace_changedcxx . . $ sna_video#colorspace_changed. = ~0; |
| 139 | video->colorspacecxx . . $ sna_video#colorspace. = value; |
| 140 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("COLORSPACE = %ld\n", (long)value)); |
| 141 | } else if (attribute == xvSyncToVblankcxx . . $ xvSyncToVblank.) { |
| 142 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: SYNC_TO_VBLANK: %d -> %d\n", __FUNCTION__, |
| 143 | video->SyncToVblank, !!value)); |
| 144 | video->SyncToVblankcxx . . $ sna_video#SyncToVblank. = !!value; |
| 145 | } else if (attribute == xvAlwaysOnTopcxx . . $ xvAlwaysOnTop.) { |
| 146 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: ALWAYS_ON_TOP: %d -> %d\n", __FUNCTION__, |
| 147 | video->AlwaysOnTop, !!value)); |
| 148 | video->color_key_changedcxx . . $ sna_video#color_key_changed. = ~0; |
| 149 | video->AlwaysOnTopcxx . . $ sna_video#AlwaysOnTop. = !!value; |
| 150 | } else |
| 151 | return BadMatchcxx . . $ `<external>/1208737181511191802/X.h:358:9`!; |
| 152 | |
| 153 | return Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!; |
| 154 | } |
| 155 | |
| 156 | static int sna_video_sprite_get_attrcxx . . $ sna_video_sprite_get_attr(be111706e3985e74).(ddGetPortAttribute_ARGScxx . . $ `src/compat-api.h:221:9`!) |
| 157 | { |
| 158 | struct sna_videocxx . . $ sna_video# *video = port->devPrivcxx . . $ _XvPortRec#devPriv..ptrcxx . . $ _DevUnion#ptr.; |
| 159 | |
| 160 | if (attribute == xvColorKeycxx . . $ xvColorKey.) |
| 161 | *value = video->color_keycxx . . $ sna_video#color_key.; |
| 162 | else if (attribute == xvColorspacecxx . . $ xvColorspace.) |
| 163 | *value = video->colorspacecxx . . $ sna_video#colorspace.; |
| 164 | else if (attribute == xvAlwaysOnTopcxx . . $ xvAlwaysOnTop.) |
| 165 | *value = video->AlwaysOnTopcxx . . $ sna_video#AlwaysOnTop.; |
| 166 | else if (attribute == xvSyncToVblankcxx . . $ xvSyncToVblank.) |
| 167 | *value = video->SyncToVblankcxx . . $ sna_video#SyncToVblank.; |
| 168 | else |
| 169 | return BadMatchcxx . . $ `<external>/1208737181511191802/X.h:358:9`!; |
| 170 | |
| 171 | return Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!; |
| 172 | } |
| 173 | |
| 174 | static int sna_video_sprite_best_sizecxx . . $ sna_video_sprite_best_size(50e899a5a8532fa0).(ddQueryBestSize_ARGScxx . . $ `src/compat-api.h:222:9`!) |
| 175 | { |
| 176 | struct sna_videocxx . . $ sna_video# *video = port->devPrivcxx . . $ _XvPortRec#devPriv..ptrcxx . . $ _DevUnion#ptr.; |
| 177 | struct snacxx . . $ sna# *sna = video->snacxx . . $ sna_video#sna.; |
| 178 | |
| 179 | if (!has_hw_scalingcxx . . $ `src/sna/sna_video_sprite.c:52:9`!(sna, video) && !sna->rendercxx . . $ sna#render..videocxx . . $ sna_render#video.) { |
| 180 | *p_w = vid_w; |
| 181 | *p_h = vid_h; |
| 182 | } else { |
| 183 | *p_w = drw_w; |
| 184 | *p_h = drw_h; |
| 185 | } |
| 186 | |
| 187 | return Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!; |
| 188 | } |
| 189 | |
| 190 | static void |
| 191 | update_dst_box_to_crtc_coordscxx . . $ update_dst_box_to_crtc_coords(7aa6553e23895ae6).(struct snacxx . . $ sna# *sna, xf86CrtcPtrcxx . . $ xf86CrtcPtr# crtc, BoxPtrcxx . . $ BoxPtr# dstBox) |
| 192 | { |
| 193 | ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn = sna->scrncxx . . $ sna#scrn.; |
| 194 | int tmp; |
| 195 | |
| 196 | switch (crtc->rotationcxx . . $ _xf86Crtc#rotation. & 0xf) { |
| 197 | case RR_Rotate_0cxx . . $ `<external>/17919557788947152127/randr.h:143:9`!: |
| 198 | dstBox->x1cxx . . $ pixman_box16#x1. -= crtc->xcxx . . $ _xf86Crtc#x.; |
| 199 | dstBox->x2cxx . . $ pixman_box16#x2. -= crtc->xcxx . . $ _xf86Crtc#x.; |
| 200 | dstBox->y1cxx . . $ pixman_box16#y1. -= crtc->ycxx . . $ _xf86Crtc#y.; |
| 201 | dstBox->y2cxx . . $ pixman_box16#y2. -= crtc->ycxx . . $ _xf86Crtc#y.; |
| 202 | break; |
| 203 | |
| 204 | case RR_Rotate_90cxx . . $ `<external>/17919557788947152127/randr.h:144:9`!: |
| 205 | tmp = dstBox->x1cxx . . $ pixman_box16#x1.; |
| 206 | dstBox->x1cxx . . $ pixman_box16#x1. = dstBox->y1cxx . . $ pixman_box16#y1. - crtc->xcxx . . $ _xf86Crtc#x.; |
| 207 | dstBox->y1cxx . . $ pixman_box16#y1. = scrn->virtualXcxx . . $ _ScrnInfoRec#virtualX. - tmp - crtc->ycxx . . $ _xf86Crtc#y.; |
| 208 | tmp = dstBox->x2cxx . . $ pixman_box16#x2.; |
| 209 | dstBox->x2cxx . . $ pixman_box16#x2. = dstBox->y2cxx . . $ pixman_box16#y2. - crtc->xcxx . . $ _xf86Crtc#x.; |
| 210 | dstBox->y2cxx . . $ pixman_box16#y2. = scrn->virtualXcxx . . $ _ScrnInfoRec#virtualX. - tmp - crtc->ycxx . . $ _xf86Crtc#y.; |
| 211 | tmp = dstBox->y1cxx . . $ pixman_box16#y1.; |
| 212 | dstBox->y1cxx . . $ pixman_box16#y1. = dstBox->y2cxx . . $ pixman_box16#y2.; |
| 213 | dstBox->y2cxx . . $ pixman_box16#y2. = tmp; |
| 214 | break; |
| 215 | |
| 216 | case RR_Rotate_180cxx . . $ `<external>/17919557788947152127/randr.h:145:9`!: |
| 217 | tmp = dstBox->x1cxx . . $ pixman_box16#x1.; |
| 218 | dstBox->x1cxx . . $ pixman_box16#x1. = scrn->virtualXcxx . . $ _ScrnInfoRec#virtualX. - dstBox->x2cxx . . $ pixman_box16#x2. - crtc->xcxx . . $ _xf86Crtc#x.; |
| 219 | dstBox->x2cxx . . $ pixman_box16#x2. = scrn->virtualXcxx . . $ _ScrnInfoRec#virtualX. - tmp - crtc->xcxx . . $ _xf86Crtc#x.; |
| 220 | tmp = dstBox->y1cxx . . $ pixman_box16#y1.; |
| 221 | dstBox->y1cxx . . $ pixman_box16#y1. = scrn->virtualYcxx . . $ _ScrnInfoRec#virtualY. - dstBox->y2cxx . . $ pixman_box16#y2. - crtc->ycxx . . $ _xf86Crtc#y.; |
| 222 | dstBox->y2cxx . . $ pixman_box16#y2. = scrn->virtualYcxx . . $ _ScrnInfoRec#virtualY. - tmp - crtc->ycxx . . $ _xf86Crtc#y.; |
| 223 | break; |
| 224 | |
| 225 | case RR_Rotate_270cxx . . $ `<external>/17919557788947152127/randr.h:146:9`!: |
| 226 | tmp = dstBox->x1cxx . . $ pixman_box16#x1.; |
| 227 | dstBox->x1cxx . . $ pixman_box16#x1. = scrn->virtualYcxx . . $ _ScrnInfoRec#virtualY. - dstBox->y1cxx . . $ pixman_box16#y1. - crtc->xcxx . . $ _xf86Crtc#x.; |
| 228 | dstBox->y1cxx . . $ pixman_box16#y1. = tmp - crtc->ycxx . . $ _xf86Crtc#y.; |
| 229 | tmp = dstBox->x2cxx . . $ pixman_box16#x2.; |
| 230 | dstBox->x2cxx . . $ pixman_box16#x2. = scrn->virtualYcxx . . $ _ScrnInfoRec#virtualY. - dstBox->y2cxx . . $ pixman_box16#y2. - crtc->xcxx . . $ _xf86Crtc#x.; |
| 231 | dstBox->y2cxx . . $ pixman_box16#y2. = tmp - crtc->ycxx . . $ _xf86Crtc#y.; |
| 232 | tmp = dstBox->x1cxx . . $ pixman_box16#x1.; |
| 233 | dstBox->x1cxx . . $ pixman_box16#x1. = dstBox->x2cxx . . $ pixman_box16#x2.; |
| 234 | dstBox->x2cxx . . $ pixman_box16#x2. = tmp; |
| 235 | break; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | static uint32_tcxx . . $ uint32_t# ckey_chancxx . . $ ckey_chan(5bb05f763058421f).(uint32_tcxx . . $ uint32_t# value, int weight) |
| 240 | { |
| 241 | return value << 8 >> weight; |
| 242 | } |
| 243 | |
| 244 | static uint32_tcxx . . $ uint32_t# ckey_value_chancxx . . $ ckey_value_chan(3b5dc7177e9501b9).(uint32_tcxx . . $ uint32_t# value, uint32_tcxx . . $ uint32_t# mask, |
| 245 | int offset, int weight) |
| 246 | { |
| 247 | return ckey_chancxx . . $ ckey_chan(5bb05f763058421f).((value & mask) >> offset, weight); |
| 248 | } |
| 249 | |
| 250 | static uint32_tcxx . . $ uint32_t# ckey_valuecxx . . $ ckey_value(76c5305da2e76985).(struct snacxx . . $ sna# *sna, |
| 251 | struct sna_videocxx . . $ sna_video# *video) |
| 252 | { |
| 253 | ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn = sna->scrncxx . . $ sna#scrn.; |
| 254 | uint32_tcxx . . $ uint32_t# r, g ,b; |
| 255 | |
| 256 | if (scrn->depthcxx . . $ _ScrnInfoRec#depth. == 8) { |
| 257 | r = g = b = video->color_keycxx . . $ sna_video#color_key. & 0xff; |
| 258 | } else { |
| 259 | r = ckey_value_chancxx . . $ ckey_value_chan(3b5dc7177e9501b9).(video->color_keycxx . . $ sna_video#color_key., scrn->maskcxx . . $ _ScrnInfoRec#mask..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red., |
| 260 | scrn->offsetcxx . . $ _ScrnInfoRec#offset..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red., scrn->weightcxx . . $ _ScrnInfoRec#weight..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red.); |
| 261 | g = ckey_value_chancxx . . $ ckey_value_chan(3b5dc7177e9501b9).(video->color_keycxx . . $ sna_video#color_key., scrn->maskcxx . . $ _ScrnInfoRec#mask..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green., |
| 262 | scrn->offsetcxx . . $ _ScrnInfoRec#offset..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green., scrn->weightcxx . . $ _ScrnInfoRec#weight..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green.); |
| 263 | b = ckey_value_chancxx . . $ ckey_value_chan(3b5dc7177e9501b9).(video->color_keycxx . . $ sna_video#color_key., scrn->maskcxx . . $ _ScrnInfoRec#mask..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue., |
| 264 | scrn->offsetcxx . . $ _ScrnInfoRec#offset..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue., scrn->weightcxx . . $ _ScrnInfoRec#weight..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.); |
| 265 | } |
| 266 | |
| 267 | return r << 16 | g << 8 | b; |
| 268 | } |
| 269 | |
| 270 | static uint32_tcxx . . $ uint32_t# ckey_mask_chancxx . . $ ckey_mask_chan(46cc46841198e427).(int weight) |
| 271 | { |
| 272 | return ckey_chancxx . . $ ckey_chan(5bb05f763058421f).((1 << weight) - 1, weight); |
| 273 | } |
| 274 | |
| 275 | static uint32_tcxx . . $ uint32_t# ckey_maskcxx . . $ ckey_mask(8d56fd0b7b3b6542).(struct snacxx . . $ sna# *sna) |
| 276 | { |
| 277 | ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn = sna->scrncxx . . $ sna#scrn.; |
| 278 | uint32_tcxx . . $ uint32_t# r = ckey_mask_chancxx . . $ ckey_mask_chan(46cc46841198e427).(scrn->weightcxx . . $ _ScrnInfoRec#weight..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red.); |
| 279 | uint32_tcxx . . $ uint32_t# g = ckey_mask_chancxx . . $ ckey_mask_chan(46cc46841198e427).(scrn->weightcxx . . $ _ScrnInfoRec#weight..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green.); |
| 280 | uint32_tcxx . . $ uint32_t# b = ckey_mask_chancxx . . $ ckey_mask_chan(46cc46841198e427).(scrn->weightcxx . . $ _ScrnInfoRec#weight..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.); |
| 281 | |
| 282 | return 0x7 << 24 | r << 16 | g << 8 | b; |
| 283 | } |
| 284 | |
| 285 | static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! |
| 286 | sna_video_sprite_showcxx . . $ sna_video_sprite_show(4073d3946541f14c).(struct snacxx . . $ sna# *sna, |
| 287 | struct sna_videocxx . . $ sna_video# *video, |
| 288 | struct sna_video_framecxx . . $ sna_video_frame# *frame, |
| 289 | xf86CrtcPtrcxx . . $ xf86CrtcPtr# crtc, |
| 290 | BoxPtrcxx . . $ BoxPtr# dstBox) |
| 291 | { |
| 292 | struct local_mode_set_planecxx . . $ local_mode_set_plane# s; |
| 293 | int pipe = sna_crtc_pipecxx . . $ sna_crtc_pipe(9e8e77c59c01f4fb).(crtc); |
| 294 | |
| 295 | /* XXX handle video spanning multiple CRTC */ |
| 296 | |
| 297 | VG_CLEARcxx . . $ `src/sna/compiler.h:93:9`!(s); |
| 298 | s.plane_idcxx . . $ local_mode_set_plane#plane_id. = sna_crtc_to_spritecxx . . $ sna_crtc_to_sprite(3cdcb1ad855bee97).(crtc, video->idxcxx . . $ sna_video#idx.); |
| 299 | |
| 300 | #define DRM_I915_SET_SPRITE_COLORKEYcxx . . $ `src/sna/sna_video_sprite.c:300:9`! 0x2b |
| 301 | #define LOCAL_IOCTL_I915_SET_SPRITE_COLORKEYcxx . . $ `src/sna/sna_video_sprite.c:301:9`! DRM_IOWRcxx . . $ `<external>/17113187487313021854/drm.h:1092:9`!(DRM_COMMAND_BASEcxx . . $ `<external>/17113187487313021854/drm.h:1368:9`! + DRM_I915_SET_SPRITE_COLORKEYcxx . . $ `src/sna/sna_video_sprite.c:300:9`!, struct local_intel_sprite_colorkey) |
| 302 | #define LOCAL_IOCTL_MODE_ADDFB2cxx . . $ `src/sna/sna_video_sprite.c:302:9`! DRM_IOWRcxx . . $ `<external>/17113187487313021854/drm.h:1092:9`!(0xb8, struct local_mode_fb_cmd2) |
| 303 | |
| 304 | if (video->color_key_changedcxx . . $ sna_video#color_key_changed. & (1 << pipe) && video->has_color_keycxx . . $ sna_video#has_color_key.) { |
| 305 | struct local_intel_sprite_colorkeycxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey# { |
| 306 | uint32_tcxx . . $ uint32_t# plane_idcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#plane_id.; |
| 307 | uint32_tcxx . . $ uint32_t# min_valuecxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#min_value.; |
| 308 | uint32_tcxx . . $ uint32_t# channel_maskcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#channel_mask.; |
| 309 | uint32_tcxx . . $ uint32_t# max_valuecxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#max_value.; |
| 310 | uint32_tcxx . . $ uint32_t# flagscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#flags.; |
| 311 | } set; |
| 312 | |
| 313 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: updating color key: %x\n", |
| 314 | __FUNCTION__, video->color_key)); |
| 315 | |
| 316 | set.plane_idcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#plane_id. = s.plane_idcxx . . $ local_mode_set_plane#plane_id.; |
| 317 | set.min_valuecxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#min_value. = ckey_valuecxx . . $ ckey_value(76c5305da2e76985).(sna, video); |
| 318 | set.max_valuecxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#max_value. = 0; /* not used for destkey */ |
| 319 | set.channel_maskcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#channel_mask. = ckey_maskcxx . . $ ckey_mask(8d56fd0b7b3b6542).(sna); |
| 320 | set.flagscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#flags. = 0; |
| 321 | if (!video->AlwaysOnTopcxx . . $ sna_video#AlwaysOnTop.) |
| 322 | set.flagscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_intel_sprite_colorkey#flags. |= 1 << 1; /* COLORKEY_DESTINATION */ |
| 323 | |
| 324 | if (drmIoctlcxx . . $ drmIoctl(abf9bb955e3c4896).(sna->kgemcxx . . $ sna#kgem..fdcxx . . $ kgem#fd., |
| 325 | LOCAL_IOCTL_I915_SET_SPRITE_COLORKEYcxx . . $ `src/sna/sna_video_sprite.c:301:9`!, |
| 326 | &set)) { |
| 327 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&s, 0, sizeof(s)); |
| 328 | s.plane_idcxx . . $ local_mode_set_plane#plane_id. = sna_crtc_to_spritecxx . . $ sna_crtc_to_sprite(3cdcb1ad855bee97).(crtc, video->idxcxx . . $ sna_video#idx.); |
| 329 | |
| 330 | /* try to disable the plane first */ |
| 331 | if (drmIoctlcxx . . $ drmIoctl(abf9bb955e3c4896).(video->snacxx . . $ sna_video#sna.->kgemcxx . . $ sna#kgem..fdcxx . . $ kgem#fd., LOCAL_IOCTL_MODE_SETPLANEcxx . . $ `src/sna/sna_video_sprite.c:55:9`!, &s)) |
| 332 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(video->snacxx . . $ sna_video#sna.->scrncxx . . $ sna#scrn.->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 333 | "failed to disable plane\n"); |
| 334 | |
| 335 | if (drmIoctlcxx . . $ drmIoctl(abf9bb955e3c4896).(sna->kgemcxx . . $ sna#kgem..fdcxx . . $ kgem#fd., LOCAL_IOCTL_I915_SET_SPRITE_COLORKEYcxx . . $ `src/sna/sna_video_sprite.c:301:9`!, &set)) { |
| 336 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(sna->scrncxx . . $ sna#scrn.->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 337 | "failed to update color key, disabling future updates\n"); |
| 338 | video->has_color_keycxx . . $ sna_video#has_color_key. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | video->color_key_changedcxx . . $ sna_video#color_key_changed. &= ~(1 << pipe); |
| 343 | } |
| 344 | |
| 345 | if (video->colorspace_changedcxx . . $ sna_video#colorspace_changed. & (1 << pipe)) { |
| 346 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: updating colorspace: %x\n", |
| 347 | __FUNCTION__, video->colorspace)); |
| 348 | |
| 349 | sna_crtc_set_sprite_colorspacecxx . . $ sna_crtc_set_sprite_colorspace(34aaa65761e397e4).(crtc, video->idxcxx . . $ sna_video#idx., |
| 350 | video->colorspacecxx . . $ sna_video#colorspace.); |
| 351 | |
| 352 | video->colorspace_changedcxx . . $ sna_video#colorspace_changed. &= ~(1 << pipe); |
| 353 | } |
| 354 | |
| 355 | update_dst_box_to_crtc_coordscxx . . $ update_dst_box_to_crtc_coords(7aa6553e23895ae6).(sna, crtc, dstBox); |
| 356 | if (frame->rotationcxx . . $ sna_video_frame#rotation. & (RR_Rotate_90cxx . . $ `<external>/17919557788947152127/randr.h:144:9`! | RR_Rotate_270cxx . . $ `<external>/17919557788947152127/randr.h:146:9`!)) { |
| 357 | int tmp = frame->widthcxx . . $ sna_video_frame#width.; |
| 358 | frame->widthcxx . . $ sna_video_frame#width. = frame->heightcxx . . $ sna_video_frame#height.; |
| 359 | frame->heightcxx . . $ sna_video_frame#height. = tmp; |
| 360 | } |
| 361 | |
| 362 | if (frame->bocxx . . $ sna_video_frame#bo.->deltacxx . . $ kgem_bo#delta. == 0) { |
| 363 | struct local_mode_fb_cmd2cxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2# { |
| 364 | uint32_tcxx . . $ uint32_t# fb_idcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#fb_id.; |
| 365 | uint32_tcxx . . $ uint32_t# widthcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#width., heightcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#height.; |
| 366 | uint32_tcxx . . $ uint32_t# pixel_formatcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pixel_format.; |
| 367 | uint32_tcxx . . $ uint32_t# flagscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#flags.; |
| 368 | |
| 369 | uint32_tcxx . . $ uint32_t# handlescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#handles.[4]; |
| 370 | uint32_tcxx . . $ uint32_t# pitchescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pitches.[4]; /* pitch for each plane */ |
| 371 | uint32_tcxx . . $ uint32_t# offsetscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#offsets.[4]; /* offset of each plane */ |
| 372 | uint64_tcxx . . $ uint64_t# modifierscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#modifiers.[4]; |
| 373 | } f; |
| 374 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! purged = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 375 | |
| 376 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&f, 0, sizeof(f)); |
| 377 | f.widthcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#width. = frame->widthcxx . . $ sna_video_frame#width.; |
| 378 | f.heightcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#height. = frame->heightcxx . . $ sna_video_frame#height.; |
| 379 | f.flagscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#flags. = 1 << 1; /* +modifiers */ |
| 380 | |
| 381 | switch (frame->bocxx . . $ sna_video_frame#bo.->tilingcxx . . $ kgem_bo#tiling.) { |
| 382 | case I915_TILING_NONEcxx . . $ `<external>/17903803794487424948/i915_drm.h:1657:9`!: |
| 383 | break; |
| 384 | case I915_TILING_Xcxx . . $ `<external>/17903803794487424948/i915_drm.h:1658:9`!: |
| 385 | /* I915_FORMAT_MOD_X_TILED */ |
| 386 | f.modifierscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#modifiers.[0] = (uint64_tcxx . . $ uint64_t#)1 << 56 | 1; |
| 387 | break; |
| 388 | case I915_TILING_Ycxx . . $ `<external>/17903803794487424948/i915_drm.h:1659:9`!: |
| 389 | /* I915_FORMAT_MOD_X_TILED */ |
| 390 | f.modifierscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#modifiers.[0] = (uint64_tcxx . . $ uint64_t#)1 << 56 | 2; |
| 391 | break; |
| 392 | } |
| 393 | |
| 394 | if (is_nv12_fourcccxx . . $ is_nv12_fourcc(7864480464b09eea).(frame->idcxx . . $ sna_video_frame#id.)) { |
| 395 | f.handlescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#handles.[0] = frame->bocxx . . $ sna_video_frame#bo.->handlecxx . . $ kgem_bo#handle.; |
| 396 | f.handlescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#handles.[1] = frame->bocxx . . $ sna_video_frame#bo.->handlecxx . . $ kgem_bo#handle.; |
| 397 | f.pitchescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pitches.[0] = frame->pitchcxx . . $ sna_video_frame#pitch.[1]; |
| 398 | f.pitchescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pitches.[1] = frame->pitchcxx . . $ sna_video_frame#pitch.[0]; |
| 399 | f.offsetscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#offsets.[0] = 0; |
| 400 | f.offsetscxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#offsets.[1] = frame->UBufOffsetcxx . . $ sna_video_frame#UBufOffset.; |
| 401 | } else { |
| 402 | f.handlescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#handles.[0] = frame->bocxx . . $ sna_video_frame#bo.->handlecxx . . $ kgem_bo#handle.; |
| 403 | f.pitchescxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pitches.[0] = frame->pitchcxx . . $ sna_video_frame#pitch.[0]; |
| 404 | } |
| 405 | |
| 406 | switch (frame->idcxx . . $ sna_video_frame#id.) { |
| 407 | case FOURCC_RGB565cxx . . $ `src/sna/sna_video.h:39:9`!: |
| 408 | f.pixel_formatcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pixel_format. = DRM_FORMAT_RGB565cxx . . $ `src/sna/sna_video_sprite.c:45:9`!; |
| 409 | purged = sna->scrncxx . . $ sna#scrn.->depthcxx . . $ _ScrnInfoRec#depth. != 16; |
| 410 | break; |
| 411 | case FOURCC_RGB888cxx . . $ `src/sna/sna_video.h:40:9`!: |
| 412 | f.pixel_formatcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pixel_format. = DRM_FORMAT_XRGB8888cxx . . $ `src/sna/sna_video_sprite.c:46:9`!; |
| 413 | purged = sna->scrncxx . . $ sna#scrn.->depthcxx . . $ _ScrnInfoRec#depth. != 24; |
| 414 | break; |
| 415 | case FOURCC_NV12cxx . . $ `src/sna/sna_video.h:41:9`!: |
| 416 | f.pixel_formatcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pixel_format. = DRM_FORMAT_NV12cxx . . $ `src/sna/sna_video_sprite.c:49:9`!; |
| 417 | break; |
| 418 | case FOURCC_UYVYcxx . . $ `<external>/5950719045248363523/fourcc.h:99:9`!: |
| 419 | f.pixel_formatcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pixel_format. = DRM_FORMAT_UYVYcxx . . $ `src/sna/sna_video_sprite.c:48:9`!; |
| 420 | break; |
| 421 | case FOURCC_AYUVcxx . . $ `src/sna/sna_video.h:42:9`!: |
| 422 | /* i915 doesn't support alpha, so we use XYUV */ |
| 423 | f.pixel_formatcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pixel_format. = DRM_FORMAT_XYUV8888cxx . . $ `src/sna/sna_video_sprite.c:50:9`!; |
| 424 | break; |
| 425 | case FOURCC_YUY2cxx . . $ `<external>/5950719045248363523/fourcc.h:39:9`!: |
| 426 | default: |
| 427 | f.pixel_formatcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#pixel_format. = DRM_FORMAT_YUYVcxx . . $ `src/sna/sna_video_sprite.c:47:9`!; |
| 428 | break; |
| 429 | } |
| 430 | |
| 431 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: creating new fb for handle=%d, width=%d, height=%d, stride=%d, format=%x\n", |
| 432 | __FUNCTION__, frame->bo->handle, frame->width, frame->height, |
| 433 | f.pitches[0], f.pixel_format)); |
| 434 | |
| 435 | if (drmIoctlcxx . . $ drmIoctl(abf9bb955e3c4896).(sna->kgemcxx . . $ sna#kgem..fdcxx . . $ kgem#fd., LOCAL_IOCTL_MODE_ADDFB2cxx . . $ `src/sna/sna_video_sprite.c:302:9`!, &f)) { |
| 436 | ERRcxx . . $ `src/sna/debug.h:41:9`!(("%s: ADDFB2 failed, errno=%d\n", __FUNCTION__, errno)); |
| 437 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(sna->scrncxx . . $ sna#scrn.->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., |
| 438 | X_ERRORcxx . . $ X_ERROR., "failed to add fb, unable to update video\n"); |
| 439 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 440 | } |
| 441 | |
| 442 | frame->bocxx . . $ sna_video_frame#bo.->deltacxx . . $ kgem_bo#delta. = f.fb_idcxx . . $ sna_video_sprite_show(4073d3946541f14c).local_mode_fb_cmd2#fb_id.; |
| 443 | |
| 444 | frame->bocxx . . $ sna_video_frame#bo.->scanoutcxx . . $ kgem_bo#scanout. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 445 | /* Don't allow the scanout to be cached if not suitable for front */ |
| 446 | frame->bocxx . . $ sna_video_frame#bo.->purgedcxx . . $ kgem_bo#purged. = purged; |
| 447 | } |
| 448 | |
| 449 | assertcxx . . $ `/usr/include/assert.h:50:10`!(frame->bo->scanout); |
| 450 | assertcxx . . $ `/usr/include/assert.h:50:10`!(frame->bo->delta); |
| 451 | |
| 452 | s.crtc_idcxx . . $ local_mode_set_plane#crtc_id. = sna_crtc_idcxx . . $ sna_crtc_id(9e8e77c59c01f4fb).(crtc); |
| 453 | s.fb_idcxx . . $ local_mode_set_plane#fb_id. = frame->bocxx . . $ sna_video_frame#bo.->deltacxx . . $ kgem_bo#delta.; |
| 454 | s.flagscxx . . $ local_mode_set_plane#flags. = 0; |
| 455 | s.crtc_xcxx . . $ local_mode_set_plane#crtc_x. = dstBox->x1cxx . . $ pixman_box16#x1.; |
| 456 | s.crtc_ycxx . . $ local_mode_set_plane#crtc_y. = dstBox->y1cxx . . $ pixman_box16#y1.; |
| 457 | s.crtc_wcxx . . $ local_mode_set_plane#crtc_w. = dstBox->x2cxx . . $ pixman_box16#x2. - dstBox->x1cxx . . $ pixman_box16#x1.; |
| 458 | s.crtc_hcxx . . $ local_mode_set_plane#crtc_h. = dstBox->y2cxx . . $ pixman_box16#y2. - dstBox->y1cxx . . $ pixman_box16#y1.; |
| 459 | s.src_xcxx . . $ local_mode_set_plane#src_x. = 0; |
| 460 | s.src_ycxx . . $ local_mode_set_plane#src_y. = 0; |
| 461 | s.src_wcxx . . $ local_mode_set_plane#src_w. = (frame->imagecxx . . $ sna_video_frame#image..x2cxx . . $ pixman_box16#x2. - frame->imagecxx . . $ sna_video_frame#image..x1cxx . . $ pixman_box16#x1.) << 16; |
| 462 | s.src_hcxx . . $ local_mode_set_plane#src_h. = (frame->imagecxx . . $ sna_video_frame#image..y2cxx . . $ pixman_box16#y2. - frame->imagecxx . . $ sna_video_frame#image..y1cxx . . $ pixman_box16#y1.) << 16; |
| 463 | |
| 464 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: updating crtc=%d, plane=%d, handle=%d [fb %d], dst=(%d,%d)x(%d,%d), src=(%d,%d)x(%d,%d)\n", |
| 465 | __FUNCTION__, s.crtc_id, s.plane_id, frame->bo->handle, s.fb_id, |
| 466 | s.crtc_x, s.crtc_y, s.crtc_w, s.crtc_h, |
| 467 | s.src_x >> 16, s.src_y >> 16, s.src_w >> 16, s.src_h >> 16)); |
| 468 | |
| 469 | if (drmIoctlcxx . . $ drmIoctl(abf9bb955e3c4896).(sna->kgemcxx . . $ sna#kgem..fdcxx . . $ kgem#fd., LOCAL_IOCTL_MODE_SETPLANEcxx . . $ `src/sna/sna_video_sprite.c:55:9`!, &s)) { |
| 470 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("SET_PLANE failed: ret=%d\n", errno)); |
| 471 | if (video->bocxx . . $ sna_video#bo.[pipe]) { |
| 472 | kgem_bo_destroycxx . . $ kgem_bo_destroy(acb82a203cb9de7a).(&sna->kgemcxx . . $ sna#kgem., video->bocxx . . $ sna_video#bo.[pipe]); |
| 473 | video->bocxx . . $ sna_video#bo.[pipe] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 474 | } |
| 475 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 476 | } |
| 477 | |
| 478 | __kgem_bo_clear_dirtycxx . . $ __kgem_bo_clear_dirty(f31555f8c4397893).(frame->bocxx . . $ sna_video_frame#bo.); |
| 479 | |
| 480 | if (video->bocxx . . $ sna_video#bo.[pipe]) |
| 481 | kgem_bo_destroycxx . . $ kgem_bo_destroy(acb82a203cb9de7a).(&sna->kgemcxx . . $ sna#kgem., video->bocxx . . $ sna_video#bo.[pipe]); |
| 482 | video->bocxx . . $ sna_video#bo.[pipe] = kgem_bo_referencecxx . . $ kgem_bo_reference(cb37ad799609c071).(frame->bocxx . . $ sna_video_frame#bo.); |
| 483 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 484 | } |
| 485 | |
| 486 | static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! need_scalingcxx . . $ need_scaling(1ed1ae3f4355bb54).(const struct sna_video_framecxx . . $ sna_video_frame# *frame, |
| 487 | const BoxReccxx . . $ BoxRec# *dst) |
| 488 | { |
| 489 | /* SKL+ need the plane scaler even for unscaled NV12 */ |
| 490 | return frame->idcxx . . $ sna_video_frame#id. == FOURCC_NV12cxx . . $ `src/sna/sna_video.h:41:9`! || |
| 491 | frame->srccxx . . $ sna_video_frame#src..x2cxx . . $ pixman_box16#x2. - frame->srccxx . . $ sna_video_frame#src..x1cxx . . $ pixman_box16#x1. != dst->x2cxx . . $ pixman_box16#x2. - dst->x1cxx . . $ pixman_box16#x1. || |
| 492 | frame->srccxx . . $ sna_video_frame#src..y2cxx . . $ pixman_box16#y2. - frame->srccxx . . $ sna_video_frame#src..y1cxx . . $ pixman_box16#y1. != dst->y2cxx . . $ pixman_box16#y2. - dst->y1cxx . . $ pixman_box16#y1.; |
| 493 | } |
| 494 | |
| 495 | static int sna_video_sprite_put_imagecxx . . $ sna_video_sprite_put_image(ca34d5cd4339f9fd).(ddPutImage_ARGScxx . . $ `src/compat-api.h:223:9`!) |
| 496 | { |
| 497 | struct sna_videocxx . . $ sna_video# *video = port->devPrivcxx . . $ _XvPortRec#devPriv..ptrcxx . . $ _DevUnion#ptr.; |
| 498 | struct snacxx . . $ sna# *sna = video->snacxx . . $ sna_video#sna.; |
| 499 | xf86CrtcConfigPtrcxx . . $ xf86CrtcConfigPtr# config = XF86_CRTC_CONFIG_PTRcxx . . $ `<external>/4565256951739191595/xf86Crtc.h:835:9`!(sna->scrn); |
| 500 | RegionReccxx . . $ RegionRec# clip; |
| 501 | BoxReccxx . . $ BoxRec# draw_extents; |
| 502 | int ret, i; |
| 503 | |
| 504 | init_video_regioncxx . . $ init_video_region(16ffa62c916b3828).(&clip, draw, drw_x, drw_y, drw_w, drw_h); |
| 505 | draw_extents = clip.extentscxx . . $ pixman_region16#extents.; |
| 506 | |
| 507 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: always_on_top=%d\n", __FUNCTION__, video->AlwaysOnTop)); |
| 508 | if (!video->AlwaysOnTopcxx . . $ sna_video#AlwaysOnTop.) { |
| 509 | ValidateGCcxx . . $ ValidateGC(846eadd374091791).(draw, gc); |
| 510 | RegionIntersectcxx . . $ RegionIntersect(e4fcd09d0a6b8050).(&clip, &clip, gc->pCompositeClipcxx . . $ _GC#pCompositeClip.); |
| 511 | } |
| 512 | |
| 513 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: src=(%d, %d),(%d, %d), dst=(%d, %d),(%d, %d), id=%d, sizep=%dx%d, sync?=%d\n", |
| 514 | __FUNCTION__, |
| 515 | src_x, src_y, src_w, src_h, |
| 516 | drw_x, drw_y, drw_w, drw_h, |
| 517 | format->id, width, height, sync)); |
| 518 | |
| 519 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: region %d:(%d, %d), (%d, %d)\n", __FUNCTION__, |
| 520 | region_num_rects(&clip), |
| 521 | clip.extents.x1, clip.extents.y1, |
| 522 | clip.extents.x2, clip.extents.y2)); |
| 523 | |
| 524 | if (RegionNilcxx . . $ RegionNil(962b0f5c995f9297).(&clip)) { |
| 525 | ret = Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!; |
| 526 | goto err; |
| 527 | } |
| 528 | |
| 529 | for (i = 0; i < video->snacxx . . $ sna_video#sna.->modecxx . . $ sna#mode..num_real_crtccxx . . $ sna_mode#num_real_crtc.; i++) { |
| 530 | xf86CrtcPtrcxx . . $ xf86CrtcPtr# crtc = config->crtccxx . . $ _xf86CrtcConfig#crtc.[i]; |
| 531 | struct sna_video_framecxx . . $ sna_video_frame# frame; |
| 532 | const int pipe = sna_crtc_pipecxx . . $ sna_crtc_pipe(9e8e77c59c01f4fb).(crtc); |
| 533 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! hw_scaling = has_hw_scalingcxx . . $ `src/sna/sna_video_sprite.c:52:9`!(sna, video); |
| 534 | INT32cxx . . $ INT32# x1, x2, y1, y2; |
| 535 | Rotationcxx . . $ Rotation# rotation; |
| 536 | RegionReccxx . . $ RegionRec# reg; |
| 537 | BoxReccxx . . $ BoxRec# dst; |
| 538 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! cache_bo; |
| 539 | |
| 540 | retry: |
| 541 | dst = draw_extents; |
| 542 | |
| 543 | sna_video_frame_initcxx . . $ sna_video_frame_init(2045b8ad3954aa45).(video, format->idcxx . . $ $anonymous_type_dff90da1b2397d0b_4#id., width, height, &frame); |
| 544 | |
| 545 | reg.extentscxx . . $ pixman_region16#extents. = crtc->boundscxx . . $ _xf86Crtc#bounds.; |
| 546 | reg.datacxx . . $ pixman_region16#data. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 547 | RegionIntersectcxx . . $ RegionIntersect(e4fcd09d0a6b8050).(®, ®, &clip); |
| 548 | if (RegionNilcxx . . $ RegionNil(962b0f5c995f9297).(®)) { |
| 549 | off: |
| 550 | assertcxx . . $ `/usr/include/assert.h:50:10`!(pipe < ARRAY_SIZE(video->bo)); |
| 551 | if (video->bocxx . . $ sna_video#bo.[pipe]) { |
| 552 | struct local_mode_set_planecxx . . $ local_mode_set_plane# s; |
| 553 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&s, 0, sizeof(s)); |
| 554 | s.plane_idcxx . . $ local_mode_set_plane#plane_id. = sna_crtc_to_spritecxx . . $ sna_crtc_to_sprite(3cdcb1ad855bee97).(crtc, video->idxcxx . . $ sna_video#idx.); |
| 555 | if (drmIoctlcxx . . $ drmIoctl(abf9bb955e3c4896).(video->snacxx . . $ sna_video#sna.->kgemcxx . . $ sna#kgem..fdcxx . . $ kgem#fd., LOCAL_IOCTL_MODE_SETPLANEcxx . . $ `src/sna/sna_video_sprite.c:55:9`!, &s)) |
| 556 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(video->snacxx . . $ sna_video#sna.->scrncxx . . $ sna#scrn.->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 557 | "failed to disable plane\n"); |
| 558 | video->bocxx . . $ sna_video#bo.[pipe] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 559 | } |
| 560 | continue; |
| 561 | } |
| 562 | |
| 563 | x1 = src_x; |
| 564 | x2 = src_x + src_w; |
| 565 | y1 = src_y; |
| 566 | y2 = src_y + src_h; |
| 567 | |
| 568 | ret = xf86XVClipVideoHelpercxx . . $ xf86XVClipVideoHelper(7a6737b15d0aa8c0).(&dst, &x1, &x2, &y1, &y2, |
| 569 | ®, frame.widthcxx . . $ sna_video_frame#width., frame.heightcxx . . $ sna_video_frame#height.); |
| 570 | RegionUninitcxx . . $ RegionUninit(353c1b2f50b7675c).(®); |
| 571 | if (!ret) |
| 572 | goto off; |
| 573 | |
| 574 | frame.srccxx . . $ sna_video_frame#src..x1cxx . . $ pixman_box16#x1. = x1 >> 16; |
| 575 | frame.srccxx . . $ sna_video_frame#src..y1cxx . . $ pixman_box16#y1. = y1 >> 16; |
| 576 | frame.srccxx . . $ sna_video_frame#src..x2cxx . . $ pixman_box16#x2. = (x2 + 0xffff) >> 16; |
| 577 | frame.srccxx . . $ sna_video_frame#src..y2cxx . . $ pixman_box16#y2. = (y2 + 0xffff) >> 16; |
| 578 | |
| 579 | frame.imagecxx . . $ sna_video_frame#image..x1cxx . . $ pixman_box16#x1. = frame.srccxx . . $ sna_video_frame#src..x1cxx . . $ pixman_box16#x1. & ~1; |
| 580 | frame.imagecxx . . $ sna_video_frame#image..x2cxx . . $ pixman_box16#x2. = ALIGNcxx . . $ `src/sna/sna.h:541:9`!(frame.src.x2, 2); |
| 581 | if (is_planar_fourcccxx . . $ is_planar_fourcc(7864480464b09eea).(frame.idcxx . . $ sna_video_frame#id.)) { |
| 582 | frame.imagecxx . . $ sna_video_frame#image..y1cxx . . $ pixman_box16#y1. = frame.srccxx . . $ sna_video_frame#src..y1cxx . . $ pixman_box16#y1. & ~1; |
| 583 | frame.imagecxx . . $ sna_video_frame#image..y2cxx . . $ pixman_box16#y2. = ALIGNcxx . . $ `src/sna/sna.h:541:9`!(frame.src.y2, 2); |
| 584 | } else { |
| 585 | frame.imagecxx . . $ sna_video_frame#image..y1cxx . . $ pixman_box16#y1. = frame.srccxx . . $ sna_video_frame#src..y1cxx . . $ pixman_box16#y1.; |
| 586 | frame.imagecxx . . $ sna_video_frame#image..y2cxx . . $ pixman_box16#y2. = frame.srccxx . . $ sna_video_frame#src..y2cxx . . $ pixman_box16#y2.; |
| 587 | } |
| 588 | |
| 589 | /* if sprite can't handle rotation natively, store it for the copy func */ |
| 590 | rotation = RR_Rotate_0cxx . . $ `<external>/17919557788947152127/randr.h:143:9`!; |
| 591 | if (!sna_crtc_set_sprite_rotationcxx . . $ sna_crtc_set_sprite_rotation(52dbe23f8222005e).(crtc, video->idxcxx . . $ sna_video#idx., crtc->rotationcxx . . $ _xf86Crtc#rotation.)) { |
| 592 | sna_crtc_set_sprite_rotationcxx . . $ sna_crtc_set_sprite_rotation(52dbe23f8222005e).(crtc, video->idxcxx . . $ sna_video#idx., RR_Rotate_0cxx . . $ `<external>/17919557788947152127/randr.h:143:9`!); |
| 593 | rotation = crtc->rotationcxx . . $ _xf86Crtc#rotation.; |
| 594 | } |
| 595 | sna_video_frame_set_rotationcxx . . $ sna_video_frame_set_rotation(7ee302316a0aafb).(video, &frame, rotation); |
| 596 | |
| 597 | if (xvmc_passthroughcxx . . $ xvmc_passthrough(7864480464b09eea).(format->idcxx . . $ $anonymous_type_dff90da1b2397d0b_4#id.)) { |
| 598 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: using passthough, name=%d\n", |
| 599 | __FUNCTION__, *(uint32_t *)buf)); |
| 600 | |
| 601 | if (*(uint32_tcxx . . $ uint32_t#*)buf == 0) |
| 602 | goto err; |
| 603 | |
| 604 | frame.bocxx . . $ sna_video_frame#bo. = kgem_create_for_namecxx . . $ kgem_create_for_name(f0726f9a29112b18).(&sna->kgemcxx . . $ sna#kgem., *(uint32_tcxx . . $ uint32_t#*)buf); |
| 605 | if (frame.bocxx . . $ sna_video_frame#bo. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 606 | ret = BadAlloccxx . . $ `<external>/1208737181511191802/X.h:369:9`!; |
| 607 | goto err; |
| 608 | } |
| 609 | |
| 610 | if (kgem_bo_sizecxx . . $ kgem_bo_size(345c111e15e07519).(frame.bocxx . . $ sna_video_frame#bo.) < frame.sizecxx . . $ sna_video_frame#size.) { |
| 611 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: bo size=%d, expected=%d\n", |
| 612 | __FUNCTION__, kgem_bo_size(frame.bo), frame.size)); |
| 613 | kgem_bo_destroycxx . . $ kgem_bo_destroy(acb82a203cb9de7a).(&sna->kgemcxx . . $ sna#kgem., frame.bocxx . . $ sna_video_frame#bo.); |
| 614 | ret = BadAlloccxx . . $ `<external>/1208737181511191802/X.h:369:9`!; |
| 615 | goto err; |
| 616 | } |
| 617 | |
| 618 | frame.imagecxx . . $ sna_video_frame#image..x1cxx . . $ pixman_box16#x1. = 0; |
| 619 | frame.imagecxx . . $ sna_video_frame#image..y1cxx . . $ pixman_box16#y1. = 0; |
| 620 | frame.imagecxx . . $ sna_video_frame#image..x2cxx . . $ pixman_box16#x2. = frame.widthcxx . . $ sna_video_frame#width.; |
| 621 | frame.imagecxx . . $ sna_video_frame#image..y2cxx . . $ pixman_box16#y2. = frame.heightcxx . . $ sna_video_frame#height.; |
| 622 | |
| 623 | cache_bo = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 624 | } else { |
| 625 | frame.bocxx . . $ sna_video_frame#bo. = sna_video_buffercxx . . $ sna_video_buffer(649416b9ae01239b).(video, &frame); |
| 626 | if (frame.bocxx . . $ sna_video_frame#bo. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 627 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: failed to allocate video bo\n", __FUNCTION__)); |
| 628 | ret = BadAlloccxx . . $ `<external>/1208737181511191802/X.h:369:9`!; |
| 629 | goto err; |
| 630 | } |
| 631 | |
| 632 | if (!sna_video_copy_datacxx . . $ sna_video_copy_data(872f30cf9ffb429f).(video, &frame, buf)) { |
| 633 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: failed to copy video data\n", __FUNCTION__)); |
| 634 | ret = BadAlloccxx . . $ `<external>/1208737181511191802/X.h:369:9`!; |
| 635 | goto err; |
| 636 | } |
| 637 | |
| 638 | cache_bo = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 639 | } |
| 640 | |
| 641 | if (!hw_scaling && sna->rendercxx . . $ sna#render..videocxx . . $ sna_render#video. && |
| 642 | need_scalingcxx . . $ need_scaling(1ed1ae3f4355bb54).(&frame, &dst)) { |
| 643 | ScreenPtrcxx . . $ ScreenPtr# screen = to_screen_from_snacxx . . $ to_screen_from_sna(aebf074cd4df3a23).(sna); |
| 644 | PixmapPtrcxx . . $ PixmapPtr# scaled; |
| 645 | RegionReccxx . . $ RegionRec# r; |
| 646 | |
| 647 | r.extentscxx . . $ pixman_region16#extents..x1cxx . . $ pixman_box16#x1. = r.extentscxx . . $ pixman_region16#extents..y1cxx . . $ pixman_box16#y1. = 0; |
| 648 | r.extentscxx . . $ pixman_region16#extents..x2cxx . . $ pixman_box16#x2. = dst.x2cxx . . $ pixman_box16#x2. - dst.x1cxx . . $ pixman_box16#x1.; |
| 649 | r.extentscxx . . $ pixman_region16#extents..y2cxx . . $ pixman_box16#y2. = dst.y2cxx . . $ pixman_box16#y2. - dst.y1cxx . . $ pixman_box16#y1.; |
| 650 | r.datacxx . . $ pixman_region16#data. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 651 | |
| 652 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: scaling from (%d, %d) to (%d, %d)\n", |
| 653 | __FUNCTION__, |
| 654 | frame.src.x2 - frame.src.x1, |
| 655 | frame.src.y2 - frame.src.y1, |
| 656 | r.extents.x2, r.extents.y2)); |
| 657 | |
| 658 | scaled = screen->CreatePixmapcxx . . $ _Screen#CreatePixmap.(screen, |
| 659 | r.extentscxx . . $ pixman_region16#extents..x2cxx . . $ pixman_box16#x2., |
| 660 | r.extentscxx . . $ pixman_region16#extents..y2cxx . . $ pixman_box16#y2., |
| 661 | 24, |
| 662 | CREATE_PIXMAP_USAGE_SCRATCHcxx . . $ `<external>/1376006743595286137/scrnintstr.h:181:9`!); |
| 663 | if (scaled == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 664 | ret = BadAlloccxx . . $ `<external>/1208737181511191802/X.h:369:9`!; |
| 665 | goto err; |
| 666 | } |
| 667 | |
| 668 | if (!sna->rendercxx . . $ sna#render..videocxx . . $ sna_render#video.(sna, video, &frame, &r, scaled)) { |
| 669 | screen->DestroyPixmapcxx . . $ _Screen#DestroyPixmap.(scaled); |
| 670 | ret = BadAlloccxx . . $ `<external>/1208737181511191802/X.h:369:9`!; |
| 671 | goto err; |
| 672 | } |
| 673 | |
| 674 | if (cache_bo) |
| 675 | sna_video_buffer_finicxx . . $ sna_video_buffer_fini(129381b6c4e8a055).(video); |
| 676 | else |
| 677 | kgem_bo_destroycxx . . $ kgem_bo_destroy(acb82a203cb9de7a).(&sna->kgemcxx . . $ sna#kgem., frame.bocxx . . $ sna_video_frame#bo.); |
| 678 | |
| 679 | frame.bocxx . . $ sna_video_frame#bo. = kgem_bo_referencecxx . . $ kgem_bo_reference(cb37ad799609c071).(__sna_pixmap_get_bocxx . . $ __sna_pixmap_get_bo(7de55692dd6e3c3b).(scaled)); |
| 680 | kgem_bo_submitcxx . . $ kgem_bo_submit(acb82a203cb9de7a).(&sna->kgemcxx . . $ sna#kgem., frame.bocxx . . $ sna_video_frame#bo.); |
| 681 | |
| 682 | frame.idcxx . . $ sna_video_frame#id. = FOURCC_RGB888cxx . . $ `src/sna/sna_video.h:40:9`!; |
| 683 | frame.srccxx . . $ sna_video_frame#src. = frame.imagecxx . . $ sna_video_frame#image. = r.extentscxx . . $ pixman_region16#extents.; |
| 684 | frame.widthcxx . . $ sna_video_frame#width. = frame.imagecxx . . $ sna_video_frame#image..x2cxx . . $ pixman_box16#x2.; |
| 685 | frame.heightcxx . . $ sna_video_frame#height. = frame.imagecxx . . $ sna_video_frame#image..y2cxx . . $ pixman_box16#y2.; |
| 686 | frame.pitchcxx . . $ sna_video_frame#pitch.[0] = frame.bocxx . . $ sna_video_frame#bo.->pitchcxx . . $ kgem_bo#pitch.; |
| 687 | |
| 688 | screen->DestroyPixmapcxx . . $ _Screen#DestroyPixmap.(scaled); |
| 689 | cache_bo = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 690 | } |
| 691 | |
| 692 | ret = Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!; |
| 693 | if (!sna_video_sprite_showcxx . . $ sna_video_sprite_show(4073d3946541f14c).(sna, video, &frame, crtc, &dst)) { |
| 694 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: failed to show video frame\n", __FUNCTION__)); |
| 695 | ret = BadAlloccxx . . $ `<external>/1208737181511191802/X.h:369:9`!; |
| 696 | } |
| 697 | |
| 698 | if (cache_bo) |
| 699 | sna_video_buffer_finicxx . . $ sna_video_buffer_fini(129381b6c4e8a055).(video); |
| 700 | else |
| 701 | kgem_bo_destroycxx . . $ kgem_bo_destroy(acb82a203cb9de7a).(&sna->kgemcxx . . $ sna#kgem., frame.bocxx . . $ sna_video_frame#bo.); |
| 702 | |
| 703 | if (ret != Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!) { |
| 704 | /* retry with GPU scaling */ |
| 705 | if (hw_scaling) { |
| 706 | hw_scaling = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 707 | goto retry; |
| 708 | } |
| 709 | goto err; |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | sna_video_fill_colorkeycxx . . $ sna_video_fill_colorkey(ba2184acb741c4a).(video, &clip); |
| 714 | sna_window_set_portcxx . . $ sna_window_set_port(9f735827aa970ebc).((WindowPtrcxx . . $ WindowPtr#)draw, port); |
| 715 | |
| 716 | return Successcxx . . $ `<external>/1208737181511191802/X.h:350:9`!; |
| 717 | |
| 718 | err: |
| 719 | #if XORG_XV_VERSIONcxx . . $ `src/compat-api.h:218:9`! < 2 |
| 720 | (void)sna_video_sprite_stop(client, port, draw); |
| 721 | #else |
| 722 | (void)sna_video_sprite_stopcxx . . $ sna_video_sprite_stop(49a0fca2bc73e33a).(port, draw); |
| 723 | #endif |
| 724 | return ret; |
| 725 | } |
| 726 | |
| 727 | static int sna_video_sprite_querycxx . . $ sna_video_sprite_query(d7fcef09b387c583).(ddQueryImageAttributes_ARGScxx . . $ `src/compat-api.h:224:9`!) |
| 728 | { |
| 729 | struct sna_videocxx . . $ sna_video# *video = port->devPrivcxx . . $ _XvPortRec#devPriv..ptrcxx . . $ _DevUnion#ptr.; |
| 730 | struct sna_video_framecxx . . $ sna_video_frame# frame; |
| 731 | int size, tmp; |
| 732 | |
| 733 | if (*w > video->snacxx . . $ sna_video#sna.->modecxx . . $ sna#mode..max_crtc_widthcxx . . $ sna_mode#max_crtc_width.) |
| 734 | *w = video->snacxx . . $ sna_video#sna.->modecxx . . $ sna#mode..max_crtc_widthcxx . . $ sna_mode#max_crtc_width.; |
| 735 | if (*h > video->snacxx . . $ sna_video#sna.->modecxx . . $ sna#mode..max_crtc_heightcxx . . $ sna_mode#max_crtc_height.) |
| 736 | *h = video->snacxx . . $ sna_video#sna.->modecxx . . $ sna#mode..max_crtc_heightcxx . . $ sna_mode#max_crtc_height.; |
| 737 | |
| 738 | if (offsets) |
| 739 | offsets[0] = 0; |
| 740 | |
| 741 | switch (format->idcxx . . $ $anonymous_type_dff90da1b2397d0b_4#id.) { |
| 742 | case FOURCC_RGB888cxx . . $ `src/sna/sna_video.h:40:9`!: |
| 743 | case FOURCC_RGB565cxx . . $ `src/sna/sna_video.h:39:9`!: |
| 744 | if (pitches) { |
| 745 | sna_video_frame_initcxx . . $ sna_video_frame_init(2045b8ad3954aa45).(video, format->idcxx . . $ $anonymous_type_dff90da1b2397d0b_4#id., *w, *h, &frame); |
| 746 | sna_video_frame_set_rotationcxx . . $ sna_video_frame_set_rotation(7ee302316a0aafb).(video, &frame, RR_Rotate_0cxx . . $ `<external>/17919557788947152127/randr.h:143:9`!); |
| 747 | pitches[0] = frame.pitchcxx . . $ sna_video_frame#pitch.[0]; |
| 748 | } |
| 749 | size = 4; |
| 750 | break; |
| 751 | |
| 752 | case FOURCC_NV12cxx . . $ `src/sna/sna_video.h:41:9`!: |
| 753 | *h = (*h + 1) & ~1; |
| 754 | size = (*w + 3) & ~3; |
| 755 | if (pitches) |
| 756 | pitches[0] = size; |
| 757 | size *= *h; |
| 758 | if (offsets) |
| 759 | offsets[1] = size; |
| 760 | tmp = (*w + 3) & ~3; |
| 761 | if (pitches) |
| 762 | pitches[1] = tmp; |
| 763 | tmp *= (*h >> 1); |
| 764 | size += tmp; |
| 765 | break; |
| 766 | case FOURCC_AYUVcxx . . $ `src/sna/sna_video.h:42:9`!: |
| 767 | tmp = *w << 2; |
| 768 | if (pitches) |
| 769 | pitches[0] = tmp; |
| 770 | size = *h * tmp; |
| 771 | break; |
| 772 | default: |
| 773 | *w = (*w + 1) & ~1; |
| 774 | *h = (*h + 1) & ~1; |
| 775 | |
| 776 | size = *w << 1; |
| 777 | if (pitches) |
| 778 | pitches[0] = size; |
| 779 | size *= *h; |
| 780 | break; |
| 781 | } |
| 782 | |
| 783 | return size; |
| 784 | } |
| 785 | |
| 786 | static int sna_video_sprite_color_keycxx . . $ sna_video_sprite_color_key(8f5d4ac0c37d280d).(struct snacxx . . $ sna# *sna) |
| 787 | { |
| 788 | ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn = sna->scrncxx . . $ sna#scrn.; |
| 789 | int color_key; |
| 790 | |
| 791 | if (xf86GetOptValIntegercxx . . $ xf86GetOptValInteger(462756413040cef9).(sna->Optionscxx . . $ sna#Options., OPTION_VIDEO_KEYcxx . . $ OPTION_VIDEO_KEY., |
| 792 | &color_key)) { |
| 793 | } else if (xf86GetOptValIntegercxx . . $ xf86GetOptValInteger(462756413040cef9).(sna->Optionscxx . . $ sna#Options., OPTION_COLOR_KEYcxx . . $ OPTION_COLOR_KEY., |
| 794 | &color_key)) { |
| 795 | } else { |
| 796 | color_key = |
| 797 | (1 << scrn->offsetcxx . . $ _ScrnInfoRec#offset..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red.) | |
| 798 | (1 << scrn->offsetcxx . . $ _ScrnInfoRec#offset..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green.) | |
| 799 | (((scrn->maskcxx . . $ _ScrnInfoRec#mask..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue. >> scrn->offsetcxx . . $ _ScrnInfoRec#offset..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.) - 1) << scrn->offsetcxx . . $ _ScrnInfoRec#offset..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.); |
| 800 | } |
| 801 | |
| 802 | return color_key & ((1 << scrn->depthcxx . . $ _ScrnInfoRec#depth.) - 1); |
| 803 | } |
| 804 | |
| 805 | static int sna_video_has_spritescxx . . $ sna_video_has_sprites(8f5d4ac0c37d280d).(struct snacxx . . $ sna# *sna) |
| 806 | { |
| 807 | xf86CrtcConfigPtrcxx . . $ xf86CrtcConfigPtr# config = XF86_CRTC_CONFIG_PTRcxx . . $ `<external>/4565256951739191595/xf86Crtc.h:835:9`!(sna->scrn); |
| 808 | unsigned min; |
| 809 | int i; |
| 810 | |
| 811 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: num_crtc=%d\n", __FUNCTION__, sna->mode.num_real_crtc)); |
| 812 | |
| 813 | if (sna->modecxx . . $ sna#mode..num_real_crtccxx . . $ sna_mode#num_real_crtc. == 0) |
| 814 | return 0; |
| 815 | |
| 816 | min = -1; |
| 817 | for (i = 0; i < sna->modecxx . . $ sna#mode..num_real_crtccxx . . $ sna_mode#num_real_crtc.; i++) { |
| 818 | unsigned count = sna_crtc_count_spritescxx . . $ sna_crtc_count_sprites(9e8e77c59c01f4fb).(config->crtccxx . . $ _xf86CrtcConfig#crtc.[i]); |
| 819 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: %d sprites found on pipe %d\n", __FUNCTION__, |
| 820 | count, sna_crtc_pipe(config->crtc[i]))); |
| 821 | if (count < min) |
| 822 | min = count; |
| 823 | } |
| 824 | |
| 825 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: min=%d\n", __FUNCTION__, min)); |
| 826 | return min; |
| 827 | } |
| 828 | |
| 829 | void sna_video_sprite_setupcxx . . $ sna_video_sprite_setup(8cc8bc1fa08eaefd).(struct snacxx . . $ sna# *sna, ScreenPtrcxx . . $ ScreenPtr# screen) |
| 830 | { |
| 831 | XvAdaptorPtrcxx . . $ XvAdaptorPtr# adaptor; |
| 832 | struct sna_videocxx . . $ sna_video# *video; |
| 833 | XvPortPtrcxx . . $ XvPortPtr# port; |
| 834 | int count, i; |
| 835 | |
| 836 | count = sna_video_has_spritescxx . . $ sna_video_has_sprites(8f5d4ac0c37d280d).(sna); |
| 837 | if (!count) |
| 838 | return; |
| 839 | |
| 840 | adaptor = sna_xv_adaptor_alloccxx . . $ sna_xv_adaptor_alloc(86e22ee1356d5d44).(sna); |
| 841 | if (!adaptor) |
| 842 | return; |
| 843 | |
| 844 | video = calloccxx . . $ calloc(63a7bf2941bfcd7a).(count, sizeof(*video)); |
| 845 | port = calloccxx . . $ calloc(63a7bf2941bfcd7a).(count, sizeof(*port)); |
| 846 | if (video == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || port == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 847 | freecxx . . $ free(5d22bdacc48458e8).(video); |
| 848 | freecxx . . $ free(5d22bdacc48458e8).(port); |
| 849 | sna->xvcxx . . $ sna#xv..num_adaptorscxx . . $ sna_xv#num_adaptors.--; |
| 850 | return; |
| 851 | } |
| 852 | |
| 853 | adaptor->typecxx . . $ $anonymous_type_dff90da1b2397d0b_5#type. = XvInputMaskcxx . . $ `<external>/9680055043540666286/Xv.h:62:9`! | XvImageMaskcxx . . $ `<external>/9680055043540666286/Xv.h:66:9`!; |
| 854 | adaptor->pScreencxx . . $ $anonymous_type_dff90da1b2397d0b_5#pScreen. = screen; |
| 855 | adaptor->namecxx . . $ $anonymous_type_dff90da1b2397d0b_5#name. = (char *)"Intel(R) Video Sprite"; |
| 856 | adaptor->nEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#nEncodings. = 1; |
| 857 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings. = xnfalloccxx . . $ `<external>/17080983469304696390/os.h:77:9`!(sizeof(XvEncodingRec)); |
| 858 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings.[0].idcxx . . $ $anonymous_type_dff90da1b2397d0b_3#id. = 0; |
| 859 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings.[0].pScreencxx . . $ $anonymous_type_dff90da1b2397d0b_3#pScreen. = screen; |
| 860 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings.[0].namecxx . . $ $anonymous_type_dff90da1b2397d0b_3#name. = (char *)"XV_IMAGE"; |
| 861 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings.[0].widthcxx . . $ $anonymous_type_dff90da1b2397d0b_3#width. = sna->modecxx . . $ sna#mode..max_crtc_widthcxx . . $ sna_mode#max_crtc_width.; |
| 862 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings.[0].heightcxx . . $ $anonymous_type_dff90da1b2397d0b_3#height. = sna->modecxx . . $ sna#mode..max_crtc_heightcxx . . $ sna_mode#max_crtc_height.; |
| 863 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings.[0].ratecxx . . $ $anonymous_type_dff90da1b2397d0b_3#rate..numeratorcxx . . $ $anonymous_type_dff90da1b2397d0b_0#numerator. = 1; |
| 864 | adaptor->pEncodingscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pEncodings.[0].ratecxx . . $ $anonymous_type_dff90da1b2397d0b_3#rate..denominatorcxx . . $ $anonymous_type_dff90da1b2397d0b_0#denominator. = 1; |
| 865 | adaptor->pFormatscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pFormats. = formatscxx . . $ formats.; |
| 866 | adaptor->nFormatscxx . . $ $anonymous_type_dff90da1b2397d0b_5#nFormats. = sna_xv_fixup_formatscxx . . $ sna_xv_fixup_formats(886cde0cca0d5506).(screen, formatscxx . . $ formats., |
| 867 | ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!(formats)); |
| 868 | adaptor->nAttributescxx . . $ $anonymous_type_dff90da1b2397d0b_5#nAttributes. = ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!(attribs); |
| 869 | adaptor->pAttributescxx . . $ $anonymous_type_dff90da1b2397d0b_5#pAttributes. = (XvAttributeReccxx . . $ XvAttributeRec# *)attribscxx . . $ attribs.; |
| 870 | |
| 871 | if (sna_has_sprite_formatcxx . . $ sna_has_sprite_format(2859f26baacc334b).(sna, DRM_FORMAT_XYUV8888cxx . . $ `src/sna/sna_video_sprite.c:50:9`!)) { |
| 872 | adaptor->pImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#pImages. = (XvImageReccxx . . $ XvImageRec# *)images_ayuvcxx . . $ images_ayuv.; |
| 873 | adaptor->nImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#nImages. = ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!(images_ayuv); |
| 874 | } else if (sna_has_sprite_formatcxx . . $ sna_has_sprite_format(2859f26baacc334b).(sna, DRM_FORMAT_NV12cxx . . $ `src/sna/sna_video_sprite.c:49:9`!)) { |
| 875 | adaptor->pImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#pImages. = (XvImageReccxx . . $ XvImageRec# *)images_nv12cxx . . $ images_nv12.; |
| 876 | adaptor->nImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#nImages. = ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!(images_nv12); |
| 877 | } else if (sna_has_sprite_formatcxx . . $ sna_has_sprite_format(2859f26baacc334b).(sna, DRM_FORMAT_RGB565cxx . . $ `src/sna/sna_video_sprite.c:45:9`!)) { |
| 878 | adaptor->pImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#pImages. = (XvImageReccxx . . $ XvImageRec# *)images_rgb565cxx . . $ images_rgb565.; |
| 879 | adaptor->nImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#nImages. = ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!(images_rgb565); |
| 880 | } else { |
| 881 | adaptor->pImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#pImages. = (XvImageReccxx . . $ XvImageRec# *)imagescxx . . $ images.; |
| 882 | adaptor->nImagescxx . . $ $anonymous_type_dff90da1b2397d0b_5#nImages. = ARRAY_SIZEcxx . . $ `<external>/7126665466336981124/dix.h:68:9`!(images); |
| 883 | } |
| 884 | |
| 885 | #if XORG_XV_VERSIONcxx . . $ `src/compat-api.h:218:9`! < 2 |
| 886 | adaptor->ddAllocatePort = sna_xv_alloc_port; |
| 887 | adaptor->ddFreePort = sna_xv_free_port; |
| 888 | #endif |
| 889 | adaptor->ddPutVideocxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddPutVideo. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 890 | adaptor->ddPutStillcxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddPutStill. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 891 | adaptor->ddGetVideocxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddGetVideo. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 892 | adaptor->ddGetStillcxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddGetStill. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 893 | adaptor->ddStopVideocxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddStopVideo. = sna_video_sprite_stopcxx . . $ sna_video_sprite_stop(49a0fca2bc73e33a).; |
| 894 | adaptor->ddSetPortAttributecxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddSetPortAttribute. = sna_video_sprite_set_attrcxx . . $ sna_video_sprite_set_attr(9b5cbc7354500ffd).; |
| 895 | adaptor->ddGetPortAttributecxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddGetPortAttribute. = sna_video_sprite_get_attrcxx . . $ sna_video_sprite_get_attr(be111706e3985e74).; |
| 896 | adaptor->ddQueryBestSizecxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddQueryBestSize. = sna_video_sprite_best_sizecxx . . $ sna_video_sprite_best_size(50e899a5a8532fa0).; |
| 897 | adaptor->ddPutImagecxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddPutImage. = sna_video_sprite_put_imagecxx . . $ sna_video_sprite_put_image(ca34d5cd4339f9fd).; |
| 898 | adaptor->ddQueryImageAttributescxx . . $ $anonymous_type_dff90da1b2397d0b_5#ddQueryImageAttributes. = sna_video_sprite_querycxx . . $ sna_video_sprite_query(d7fcef09b387c583).; |
| 899 | |
| 900 | adaptor->nPortscxx . . $ $anonymous_type_dff90da1b2397d0b_5#nPorts. = count; |
| 901 | adaptor->pPortscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pPorts. = port; |
| 902 | |
| 903 | for (i = 0; i < count; i++) { |
| 904 | port->idcxx . . $ _XvPortRec#id. = FakeClientIDcxx . . $ FakeClientID(46cc46841198e427).(0); |
| 905 | AddResourcecxx . . $ AddResource(f92f559881c6899e).(port->idcxx . . $ _XvPortRec#id., XvGetRTPortcxx . . $ XvGetRTPort(f708dce9a8856c70).(), port); |
| 906 | port->pAdaptorcxx . . $ _XvPortRec#pAdaptor. = adaptor; |
| 907 | port->pNotifycxx . . $ _XvPortRec#pNotify. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 908 | port->pDrawcxx . . $ _XvPortRec#pDraw. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 909 | port->clientcxx . . $ _XvPortRec#client. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 910 | port->grabcxx . . $ _XvPortRec#grab..clientcxx . . $ $anonymous_type_dff90da1b2397d0b_2#client. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 911 | port->timecxx . . $ _XvPortRec#time. = currentTimecxx . . $ currentTime.; |
| 912 | port->devPrivcxx . . $ _XvPortRec#devPriv..ptrcxx . . $ _DevUnion#ptr. = video; |
| 913 | |
| 914 | video->snacxx . . $ sna_video#sna. = sna; |
| 915 | video->idxcxx . . $ sna_video#idx. = i; |
| 916 | video->alignmentcxx . . $ sna_video#alignment. = 64; |
| 917 | video->color_keycxx . . $ sna_video#color_key. = sna_video_sprite_color_keycxx . . $ sna_video_sprite_color_key(8f5d4ac0c37d280d).(sna); |
| 918 | video->color_key_changedcxx . . $ sna_video#color_key_changed. = ~0; |
| 919 | video->colorspacecxx . . $ sna_video#colorspace. = 1; /* BT.709 */ |
| 920 | video->colorspace_changedcxx . . $ sna_video#colorspace_changed. = ~0; |
| 921 | video->has_color_keycxx . . $ sna_video#has_color_key. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 922 | video->brightnesscxx . . $ sna_video#brightness. = -19; /* (255/219) * -16 */ |
| 923 | video->contrastcxx . . $ sna_video#contrast. = 75; /* 255/219 * 64 */ |
| 924 | video->saturationcxx . . $ sna_video#saturation. = 146; /* 128/112 * 128 */ |
| 925 | video->desired_crtccxx . . $ sna_video#desired_crtc. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 926 | video->gamma5cxx . . $ sna_video#gamma5. = 0xc0c0c0; |
| 927 | video->gamma4cxx . . $ sna_video#gamma4. = 0x808080; |
| 928 | video->gamma3cxx . . $ sna_video#gamma3. = 0x404040; |
| 929 | video->gamma2cxx . . $ sna_video#gamma2. = 0x202020; |
| 930 | video->gamma1cxx . . $ sna_video#gamma1. = 0x101010; |
| 931 | video->gamma0cxx . . $ sna_video#gamma0. = 0x080808; |
| 932 | RegionNullcxx . . $ RegionNull(353c1b2f50b7675c).(&video->clipcxx . . $ sna_video#clip.); |
| 933 | video->SyncToVblankcxx . . $ sna_video#SyncToVblank. = 1; |
| 934 | |
| 935 | port++; |
| 936 | video++; |
| 937 | } |
| 938 | adaptor->base_idcxx . . $ $anonymous_type_dff90da1b2397d0b_5#base_id. = adaptor->pPortscxx . . $ $anonymous_type_dff90da1b2397d0b_5#pPorts.[0].idcxx . . $ _XvPortRec#id.; |
| 939 | |
| 940 | xvColorKeycxx . . $ xvColorKey. = MAKE_ATOMcxx . . $ `src/sna/sna_video_sprite.c:71:9`!("XV_COLORKEY"); |
| 941 | xvColorspacecxx . . $ xvColorspace. = MAKE_ATOMcxx . . $ `src/sna/sna_video_sprite.c:71:9`!("XV_COLORSPACE"); |
| 942 | xvAlwaysOnTopcxx . . $ xvAlwaysOnTop. = MAKE_ATOMcxx . . $ `src/sna/sna_video_sprite.c:71:9`!("XV_ALWAYS_ON_TOP"); |
| 943 | xvSyncToVblankcxx . . $ xvSyncToVblank. = MAKE_ATOMcxx . . $ `src/sna/sna_video_sprite.c:71:9`!("XV_SYNC_TO_VBLANK"); |
| 944 | |
| 945 | DBGcxx . . $ `src/sna/debug.h:35:9`!(("%s: '%s' initialized %d ports\n", __FUNCTION__, adaptor->name, adaptor->nPorts)); |
| 946 | } |