Package: libmovit8 Version: 1.7.0-1 Severity: important Control: affects -1 nageru
I get this crash on nageru startup (AMD box, VA-API doesn't work, but that's another issue). Rolling back libmovit8 to 1.6.3-5 gets it working again. $ nageru --no-srt --record-x264-video --recording-dir /tmp/nageru-recordings/ x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x264 [info]: profile Constrained Baseline, level 3.1, 4:2:0, 8-bit libva info: VA-API version 1.19.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: Found init function __vaDriverInit_1_17 libva info: va_openDriver() returns 0 Could not initialize VA-API for MJPEG encoding: Can't find entry points for suitable codec profile. JPEGs will be encoded in software if needed. Shader compile log: 0:812(14): preprocessor error: syntax error, unexpected HASH_TOKEN, expecting NEWLINE Failed to compile shader: /* 1 */ #version 150 /* 2 */ #extension GL_ARB_compute_shader : enable /* 3 */ #extension GL_ARB_shader_image_load_store : enable /* 4 */ #extension GL_ARB_shader_image_size : enable /* 5 */ /* 6 */ // The texture the compute shader is writing to. /* 7 */ uniform restrict writeonly image2D tex_outbuf; /* 8 */ /* 9 */ // Defined in footer.comp. /* 10 */ vec4 tex2D(sampler2D s, vec2 coord); /* 11 */ void cs_output(uvec2 coord, vec4 val); /* 12 */ void cs_output(ivec2 coord, vec4 val); /* 13 */ /* 14 */ // Used if there are any steps used to postprocess compute shader output. /* 15 */ // Initialized due to https://bugs.freedesktop.org/show_bug.cgi?id=103895. /* 16 */ vec4 CS_OUTPUT_VAL = vec4(0.0); /* 17 */ /* 18 */ #define OUTPUT(tc, val) cs_output(tc, val) /* 19 */ uniform sampler2D eff0_tex_y; /* 20 */ uniform sampler2D eff0_tex_cbcr; /* 21 */ uniform int eff0_needs_mipmaps; /* 22 */ uniform vec2 eff0_cb_offset; /* 23 */ uniform vec2 eff0_cr_offset; /* 24 */ uniform vec3 eff0_offset; /* 25 */ uniform mat3 eff0_inv_ycbcr_matrix; /* 26 */ uniform int eff1_source_curve; /* 27 */ uniform float eff1_linear_scale; /* 28 */ uniform float eff1_beta; /* 29 */ uniform float eff1_c[5]; /* 30 */ uniform int eff2_source_space; /* 31 */ uniform int eff2_destination_space; /* 32 */ uniform sampler2D eff3_tex_y; /* 33 */ uniform sampler2D eff3_tex_cbcr; /* 34 */ uniform int eff3_needs_mipmaps; /* 35 */ uniform vec2 eff3_cb_offset; /* 36 */ uniform vec2 eff3_cr_offset; /* 37 */ uniform vec3 eff3_offset; /* 38 */ uniform mat3 eff3_inv_ycbcr_matrix; /* 39 */ uniform int eff4_source_curve; /* 40 */ uniform float eff4_linear_scale; /* 41 */ uniform float eff4_beta; /* 42 */ uniform float eff4_c[5]; /* 43 */ uniform int eff5_source_space; /* 44 */ uniform int eff5_destination_space; /* 45 */ uniform sampler2D eff6_tex_y; /* 46 */ uniform sampler2D eff6_tex_cbcr; /* 47 */ uniform int eff6_needs_mipmaps; /* 48 */ uniform vec2 eff6_cb_offset; /* 49 */ uniform vec2 eff6_cr_offset; /* 50 */ uniform vec3 eff6_offset; /* 51 */ uniform mat3 eff6_inv_ycbcr_matrix; /* 52 */ uniform int eff7_source_curve; /* 53 */ uniform float eff7_linear_scale; /* 54 */ uniform float eff7_beta; /* 55 */ uniform float eff7_c[5]; /* 56 */ uniform int eff8_source_space; /* 57 */ uniform int eff8_destination_space; /* 58 */ uniform sampler2D eff9_tex_y; /* 59 */ uniform sampler2D eff9_tex_cbcr; /* 60 */ uniform int eff9_needs_mipmaps; /* 61 */ uniform vec2 eff9_cb_offset; /* 62 */ uniform vec2 eff9_cr_offset; /* 63 */ uniform vec3 eff9_offset; /* 64 */ uniform mat3 eff9_inv_ycbcr_matrix; /* 65 */ uniform int eff10_source_curve; /* 66 */ uniform float eff10_linear_scale; /* 67 */ uniform float eff10_beta; /* 68 */ uniform float eff10_c[5]; /* 69 */ uniform int eff11_source_space; /* 70 */ uniform int eff11_destination_space; /* 71 */ uniform sampler2D eff12_tex_y; /* 72 */ uniform sampler2D eff12_tex_cbcr; /* 73 */ uniform int eff12_needs_mipmaps; /* 74 */ uniform vec2 eff12_cb_offset; /* 75 */ uniform vec2 eff12_cr_offset; /* 76 */ uniform vec3 eff12_offset; /* 77 */ uniform mat3 eff12_inv_ycbcr_matrix; /* 78 */ uniform int eff13_source_curve; /* 79 */ uniform float eff13_linear_scale; /* 80 */ uniform float eff13_beta; /* 81 */ uniform float eff13_c[5]; /* 82 */ uniform int eff14_source_space; /* 83 */ uniform int eff14_destination_space; /* 84 */ uniform int eff15_enable_spatial_interlacing_check; /* 85 */ uniform int eff15_current_field_position; /* 86 */ uniform ivec2 eff15_output_size; /* 87 */ uniform float eff15_inv_width; /* 88 */ uniform float eff15_inv_height; /* 89 */ uniform float eff15_current_field_vertical_offset; /* 90 */ uniform vec2 eff15_inv_output_size; /* 91 */ uniform vec2 eff15_output_texcoord_adjust; /* 92 */ /* 93 */ #define FUNCNAME eff0 /* 94 */ #define Y_CB_CR_SAME_TEXTURE 0 /* 95 */ #define CB_CR_SAME_TEXTURE 1 /* 96 */ #define CB_CR_OFFSETS_EQUAL 1 /* 97 */ // Implicit uniforms: /* 98 */ // uniform sampler2D eff0_tex_y; /* 99 */ // uniform sampler2D eff0_tex_cbcr; // If CB_CR_SAME_TEXTURE. /* 100 */ // uniform sampler2D eff0_tex_cb; // If not CB_CR_SAME_TEXTURE. /* 101 */ // uniform sampler2D eff0_tex_cr; // If not CB_CR_SAME_TEXTURE. /* 102 */ // uniform mat3 eff0_ycbcr_matrix; /* 103 */ // uniform vec3 eff0_offset; /* 104 */ // uniform vec2 eff0_cb_offset; /* 105 */ // uniform vec2 eff0_cr_offset; /* 106 */ /* 107 */ vec4 FUNCNAME(vec2 tc) { /* 108 */ // OpenGL's origin is bottom-left, but most graphics software assumes /* 109 */ // a top-left origin. Thus, for inputs that come from the user, /* 110 */ // we flip the y coordinate. /* 111 */ tc.y = 1.0 - tc.y; /* 112 */ /* 113 */ vec3 ycbcr; /* 114 */ #if Y_CB_CR_SAME_TEXTURE /* 115 */ ycbcr = tex2D(eff0_tex_y, tc).xyz; /* 116 */ #else /* 117 */ ycbcr.x = tex2D(eff0_tex_y, tc).x; /* 118 */ #if CB_CR_SAME_TEXTURE /* 119 */ #if CB_CR_OFFSETS_EQUAL /* 120 */ ycbcr.yz = tex2D(eff0_tex_cbcr, tc + eff0_cb_offset).xy; /* 121 */ #else /* 122 */ ycbcr.y = tex2D(eff0_tex_cbcr, tc + eff0_cb_offset).x; /* 123 */ ycbcr.z = tex2D(eff0_tex_cbcr, tc + eff0_cr_offset).x; /* 124 */ #endif /* 125 */ #else /* 126 */ ycbcr.y = tex2D(eff0_tex_cb, tc + eff0_cb_offset).x; /* 127 */ ycbcr.z = tex2D(eff0_tex_cr, tc + eff0_cr_offset).x; /* 128 */ #endif /* 129 */ #endif /* 130 */ /* 131 */ ycbcr -= eff0_offset; /* 132 */ /* 133 */ vec4 rgba; /* 134 */ rgba.rgb = eff0_inv_ycbcr_matrix * ycbcr; /* 135 */ rgba.a = 1.0; /* 136 */ return rgba; /* 137 */ } /* 138 */ #undef CB_CR_SAME_TEXTURE /* 139 */ #undef Y_CB_CR_SAME_TEXTURE /* 140 */ #undef FUNCNAME /* 141 */ /* 142 */ #define INPUT eff0 /* 143 */ /* 144 */ #define FUNCNAME eff1 /* 145 */ // Expand gamma curve. /* 146 */ /* 147 */ // Implicit uniforms: /* 148 */ // uniform float eff1_linear_scale; /* 149 */ // uniform float eff1_c[5]; /* 150 */ // uniform float eff1_beta; /* 151 */ /* 152 */ vec4 FUNCNAME(vec2 tc) { /* 153 */ vec4 x = INPUT(tc); /* 154 */ /* 155 */ vec3 a = x.rgb * eff1_linear_scale; /* 156 */ /* 157 */ // Fourth-order polynomial approximation to pow(). See the .cpp file for details. /* 158 */ vec3 b = eff1_c[0] + (eff1_c[1] + (eff1_c[2] + (eff1_c[3] + eff1_c[4] * x.rgb) * x.rgb) * x.rgb) * x.rgb; /* 159 */ /* 160 */ vec3 f = vec3(greaterThan(x.rgb, vec3(eff1_beta))); /* 161 */ x = vec4(mix(a, b, f), x.a); /* 162 */ /* 163 */ return x; /* 164 */ } /* 165 */ #undef FUNCNAME /* 166 */ #undef INPUT /* 167 */ /* 168 */ #define INPUT eff1 /* 169 */ /* 170 */ #define FUNCNAME eff2 /* 171 */ const mat3 eff2_conversion_matrix = mat3( /* 172 */ 9.99894857e-01, 8.33598905e-05, 2.41046644e-05, /* 173 */ -4.85722573e-17, 9.99956206e-01, -3.81639165e-17, /* 174 */ -6.64767369e-05, 5.53508065e-06, 1.00003448e+00); /* 175 */ /* 176 */ // Colorspace conversion (needs to be done in linear space). /* 177 */ // The matrix is computed on the host and baked into the shader at compile time. /* 178 */ /* 179 */ vec4 FUNCNAME(vec2 tc) { /* 180 */ vec4 x = INPUT(tc); /* 181 */ x.rgb = eff2_conversion_matrix * x.rgb; /* 182 */ return x; /* 183 */ } /* 184 */ #undef FUNCNAME /* 185 */ #undef INPUT /* 186 */ /* 187 */ /* 188 */ #define FUNCNAME eff3 /* 189 */ #define Y_CB_CR_SAME_TEXTURE 0 /* 190 */ #define CB_CR_SAME_TEXTURE 1 /* 191 */ #define CB_CR_OFFSETS_EQUAL 1 /* 192 */ // Implicit uniforms: /* 193 */ // uniform sampler2D eff3_tex_y; /* 194 */ // uniform sampler2D eff3_tex_cbcr; // If CB_CR_SAME_TEXTURE. /* 195 */ // uniform sampler2D eff3_tex_cb; // If not CB_CR_SAME_TEXTURE. /* 196 */ // uniform sampler2D eff3_tex_cr; // If not CB_CR_SAME_TEXTURE. /* 197 */ // uniform mat3 eff3_ycbcr_matrix; /* 198 */ // uniform vec3 eff3_offset; /* 199 */ // uniform vec2 eff3_cb_offset; /* 200 */ // uniform vec2 eff3_cr_offset; /* 201 */ /* 202 */ vec4 FUNCNAME(vec2 tc) { /* 203 */ // OpenGL's origin is bottom-left, but most graphics software assumes /* 204 */ // a top-left origin. Thus, for inputs that come from the user, /* 205 */ // we flip the y coordinate. /* 206 */ tc.y = 1.0 - tc.y; /* 207 */ /* 208 */ vec3 ycbcr; /* 209 */ #if Y_CB_CR_SAME_TEXTURE /* 210 */ ycbcr = tex2D(eff3_tex_y, tc).xyz; /* 211 */ #else /* 212 */ ycbcr.x = tex2D(eff3_tex_y, tc).x; /* 213 */ #if CB_CR_SAME_TEXTURE /* 214 */ #if CB_CR_OFFSETS_EQUAL /* 215 */ ycbcr.yz = tex2D(eff3_tex_cbcr, tc + eff3_cb_offset).xy; /* 216 */ #else /* 217 */ ycbcr.y = tex2D(eff3_tex_cbcr, tc + eff3_cb_offset).x; /* 218 */ ycbcr.z = tex2D(eff3_tex_cbcr, tc + eff3_cr_offset).x; /* 219 */ #endif /* 220 */ #else /* 221 */ ycbcr.y = tex2D(eff3_tex_cb, tc + eff3_cb_offset).x; /* 222 */ ycbcr.z = tex2D(eff3_tex_cr, tc + eff3_cr_offset).x; /* 223 */ #endif /* 224 */ #endif /* 225 */ /* 226 */ ycbcr -= eff3_offset; /* 227 */ /* 228 */ vec4 rgba; /* 229 */ rgba.rgb = eff3_inv_ycbcr_matrix * ycbcr; /* 230 */ rgba.a = 1.0; /* 231 */ return rgba; /* 232 */ } /* 233 */ #undef CB_CR_SAME_TEXTURE /* 234 */ #undef Y_CB_CR_SAME_TEXTURE /* 235 */ #undef FUNCNAME /* 236 */ /* 237 */ #define INPUT eff3 /* 238 */ /* 239 */ #define FUNCNAME eff4 /* 240 */ // Expand gamma curve. /* 241 */ /* 242 */ // Implicit uniforms: /* 243 */ // uniform float eff4_linear_scale; /* 244 */ // uniform float eff4_c[5]; /* 245 */ // uniform float eff4_beta; /* 246 */ /* 247 */ vec4 FUNCNAME(vec2 tc) { /* 248 */ vec4 x = INPUT(tc); /* 249 */ /* 250 */ vec3 a = x.rgb * eff4_linear_scale; /* 251 */ /* 252 */ // Fourth-order polynomial approximation to pow(). See the .cpp file for details. /* 253 */ vec3 b = eff4_c[0] + (eff4_c[1] + (eff4_c[2] + (eff4_c[3] + eff4_c[4] * x.rgb) * x.rgb) * x.rgb) * x.rgb; /* 254 */ /* 255 */ vec3 f = vec3(greaterThan(x.rgb, vec3(eff4_beta))); /* 256 */ x = vec4(mix(a, b, f), x.a); /* 257 */ /* 258 */ return x; /* 259 */ } /* 260 */ #undef FUNCNAME /* 261 */ #undef INPUT /* 262 */ /* 263 */ #define INPUT eff4 /* 264 */ /* 265 */ #define FUNCNAME eff5 /* 266 */ const mat3 eff5_conversion_matrix = mat3( /* 267 */ 9.99894857e-01, 8.33598905e-05, 2.41046644e-05, /* 268 */ -4.85722573e-17, 9.99956206e-01, -3.81639165e-17, /* 269 */ -6.64767369e-05, 5.53508065e-06, 1.00003448e+00); /* 270 */ /* 271 */ // Colorspace conversion (needs to be done in linear space). /* 272 */ // The matrix is computed on the host and baked into the shader at compile time. /* 273 */ /* 274 */ vec4 FUNCNAME(vec2 tc) { /* 275 */ vec4 x = INPUT(tc); /* 276 */ x.rgb = eff5_conversion_matrix * x.rgb; /* 277 */ return x; /* 278 */ } /* 279 */ #undef FUNCNAME /* 280 */ #undef INPUT /* 281 */ /* 282 */ /* 283 */ #define FUNCNAME eff6 /* 284 */ #define Y_CB_CR_SAME_TEXTURE 0 /* 285 */ #define CB_CR_SAME_TEXTURE 1 /* 286 */ #define CB_CR_OFFSETS_EQUAL 1 /* 287 */ // Implicit uniforms: /* 288 */ // uniform sampler2D eff6_tex_y; /* 289 */ // uniform sampler2D eff6_tex_cbcr; // If CB_CR_SAME_TEXTURE. /* 290 */ // uniform sampler2D eff6_tex_cb; // If not CB_CR_SAME_TEXTURE. /* 291 */ // uniform sampler2D eff6_tex_cr; // If not CB_CR_SAME_TEXTURE. /* 292 */ // uniform mat3 eff6_ycbcr_matrix; /* 293 */ // uniform vec3 eff6_offset; /* 294 */ // uniform vec2 eff6_cb_offset; /* 295 */ // uniform vec2 eff6_cr_offset; /* 296 */ /* 297 */ vec4 FUNCNAME(vec2 tc) { /* 298 */ // OpenGL's origin is bottom-left, but most graphics software assumes /* 299 */ // a top-left origin. Thus, for inputs that come from the user, /* 300 */ // we flip the y coordinate. /* 301 */ tc.y = 1.0 - tc.y; /* 302 */ /* 303 */ vec3 ycbcr; /* 304 */ #if Y_CB_CR_SAME_TEXTURE /* 305 */ ycbcr = tex2D(eff6_tex_y, tc).xyz; /* 306 */ #else /* 307 */ ycbcr.x = tex2D(eff6_tex_y, tc).x; /* 308 */ #if CB_CR_SAME_TEXTURE /* 309 */ #if CB_CR_OFFSETS_EQUAL /* 310 */ ycbcr.yz = tex2D(eff6_tex_cbcr, tc + eff6_cb_offset).xy; /* 311 */ #else /* 312 */ ycbcr.y = tex2D(eff6_tex_cbcr, tc + eff6_cb_offset).x; /* 313 */ ycbcr.z = tex2D(eff6_tex_cbcr, tc + eff6_cr_offset).x; /* 314 */ #endif /* 315 */ #else /* 316 */ ycbcr.y = tex2D(eff6_tex_cb, tc + eff6_cb_offset).x; /* 317 */ ycbcr.z = tex2D(eff6_tex_cr, tc + eff6_cr_offset).x; /* 318 */ #endif /* 319 */ #endif /* 320 */ /* 321 */ ycbcr -= eff6_offset; /* 322 */ /* 323 */ vec4 rgba; /* 324 */ rgba.rgb = eff6_inv_ycbcr_matrix * ycbcr; /* 325 */ rgba.a = 1.0; /* 326 */ return rgba; /* 327 */ } /* 328 */ #undef CB_CR_SAME_TEXTURE /* 329 */ #undef Y_CB_CR_SAME_TEXTURE /* 330 */ #undef FUNCNAME /* 331 */ /* 332 */ #define INPUT eff6 /* 333 */ /* 334 */ #define FUNCNAME eff7 /* 335 */ // Expand gamma curve. /* 336 */ /* 337 */ // Implicit uniforms: /* 338 */ // uniform float eff7_linear_scale; /* 339 */ // uniform float eff7_c[5]; /* 340 */ // uniform float eff7_beta; /* 341 */ /* 342 */ vec4 FUNCNAME(vec2 tc) { /* 343 */ vec4 x = INPUT(tc); /* 344 */ /* 345 */ vec3 a = x.rgb * eff7_linear_scale; /* 346 */ /* 347 */ // Fourth-order polynomial approximation to pow(). See the .cpp file for details. /* 348 */ vec3 b = eff7_c[0] + (eff7_c[1] + (eff7_c[2] + (eff7_c[3] + eff7_c[4] * x.rgb) * x.rgb) * x.rgb) * x.rgb; /* 349 */ /* 350 */ vec3 f = vec3(greaterThan(x.rgb, vec3(eff7_beta))); /* 351 */ x = vec4(mix(a, b, f), x.a); /* 352 */ /* 353 */ return x; /* 354 */ } /* 355 */ #undef FUNCNAME /* 356 */ #undef INPUT /* 357 */ /* 358 */ #define INPUT eff7 /* 359 */ /* 360 */ #define FUNCNAME eff8 /* 361 */ const mat3 eff8_conversion_matrix = mat3( /* 362 */ 9.99894857e-01, 8.33598905e-05, 2.41046644e-05, /* 363 */ -4.85722573e-17, 9.99956206e-01, -3.81639165e-17, /* 364 */ -6.64767369e-05, 5.53508065e-06, 1.00003448e+00); /* 365 */ /* 366 */ // Colorspace conversion (needs to be done in linear space). /* 367 */ // The matrix is computed on the host and baked into the shader at compile time. /* 368 */ /* 369 */ vec4 FUNCNAME(vec2 tc) { /* 370 */ vec4 x = INPUT(tc); /* 371 */ x.rgb = eff8_conversion_matrix * x.rgb; /* 372 */ return x; /* 373 */ } /* 374 */ #undef FUNCNAME /* 375 */ #undef INPUT /* 376 */ /* 377 */ /* 378 */ #define FUNCNAME eff9 /* 379 */ #define Y_CB_CR_SAME_TEXTURE 0 /* 380 */ #define CB_CR_SAME_TEXTURE 1 /* 381 */ #define CB_CR_OFFSETS_EQUAL 1 /* 382 */ // Implicit uniforms: /* 383 */ // uniform sampler2D eff9_tex_y; /* 384 */ // uniform sampler2D eff9_tex_cbcr; // If CB_CR_SAME_TEXTURE. /* 385 */ // uniform sampler2D eff9_tex_cb; // If not CB_CR_SAME_TEXTURE. /* 386 */ // uniform sampler2D eff9_tex_cr; // If not CB_CR_SAME_TEXTURE. /* 387 */ // uniform mat3 eff9_ycbcr_matrix; /* 388 */ // uniform vec3 eff9_offset; /* 389 */ // uniform vec2 eff9_cb_offset; /* 390 */ // uniform vec2 eff9_cr_offset; /* 391 */ /* 392 */ vec4 FUNCNAME(vec2 tc) { /* 393 */ // OpenGL's origin is bottom-left, but most graphics software assumes /* 394 */ // a top-left origin. Thus, for inputs that come from the user, /* 395 */ // we flip the y coordinate. /* 396 */ tc.y = 1.0 - tc.y; /* 397 */ /* 398 */ vec3 ycbcr; /* 399 */ #if Y_CB_CR_SAME_TEXTURE /* 400 */ ycbcr = tex2D(eff9_tex_y, tc).xyz; /* 401 */ #else /* 402 */ ycbcr.x = tex2D(eff9_tex_y, tc).x; /* 403 */ #if CB_CR_SAME_TEXTURE /* 404 */ #if CB_CR_OFFSETS_EQUAL /* 405 */ ycbcr.yz = tex2D(eff9_tex_cbcr, tc + eff9_cb_offset).xy; /* 406 */ #else /* 407 */ ycbcr.y = tex2D(eff9_tex_cbcr, tc + eff9_cb_offset).x; /* 408 */ ycbcr.z = tex2D(eff9_tex_cbcr, tc + eff9_cr_offset).x; /* 409 */ #endif /* 410 */ #else /* 411 */ ycbcr.y = tex2D(eff9_tex_cb, tc + eff9_cb_offset).x; /* 412 */ ycbcr.z = tex2D(eff9_tex_cr, tc + eff9_cr_offset).x; /* 413 */ #endif /* 414 */ #endif /* 415 */ /* 416 */ ycbcr -= eff9_offset; /* 417 */ /* 418 */ vec4 rgba; /* 419 */ rgba.rgb = eff9_inv_ycbcr_matrix * ycbcr; /* 420 */ rgba.a = 1.0; /* 421 */ return rgba; /* 422 */ } /* 423 */ #undef CB_CR_SAME_TEXTURE /* 424 */ #undef Y_CB_CR_SAME_TEXTURE /* 425 */ #undef FUNCNAME /* 426 */ /* 427 */ #define INPUT eff9 /* 428 */ /* 429 */ #define FUNCNAME eff10 /* 430 */ // Expand gamma curve. /* 431 */ /* 432 */ // Implicit uniforms: /* 433 */ // uniform float eff10_linear_scale; /* 434 */ // uniform float eff10_c[5]; /* 435 */ // uniform float eff10_beta; /* 436 */ /* 437 */ vec4 FUNCNAME(vec2 tc) { /* 438 */ vec4 x = INPUT(tc); /* 439 */ /* 440 */ vec3 a = x.rgb * eff10_linear_scale; /* 441 */ /* 442 */ // Fourth-order polynomial approximation to pow(). See the .cpp file for details. /* 443 */ vec3 b = eff10_c[0] + (eff10_c[1] + (eff10_c[2] + (eff10_c[3] + eff10_c[4] * x.rgb) * x.rgb) * x.rgb) * x.rgb; /* 444 */ /* 445 */ vec3 f = vec3(greaterThan(x.rgb, vec3(eff10_beta))); /* 446 */ x = vec4(mix(a, b, f), x.a); /* 447 */ /* 448 */ return x; /* 449 */ } /* 450 */ #undef FUNCNAME /* 451 */ #undef INPUT /* 452 */ /* 453 */ #define INPUT eff10 /* 454 */ /* 455 */ #define FUNCNAME eff11 /* 456 */ const mat3 eff11_conversion_matrix = mat3( /* 457 */ 9.99894857e-01, 8.33598905e-05, 2.41046644e-05, /* 458 */ -4.85722573e-17, 9.99956206e-01, -3.81639165e-17, /* 459 */ -6.64767369e-05, 5.53508065e-06, 1.00003448e+00); /* 460 */ /* 461 */ // Colorspace conversion (needs to be done in linear space). /* 462 */ // The matrix is computed on the host and baked into the shader at compile time. /* 463 */ /* 464 */ vec4 FUNCNAME(vec2 tc) { /* 465 */ vec4 x = INPUT(tc); /* 466 */ x.rgb = eff11_conversion_matrix * x.rgb; /* 467 */ return x; /* 468 */ } /* 469 */ #undef FUNCNAME /* 470 */ #undef INPUT /* 471 */ /* 472 */ /* 473 */ #define FUNCNAME eff12 /* 474 */ #define Y_CB_CR_SAME_TEXTURE 0 /* 475 */ #define CB_CR_SAME_TEXTURE 1 /* 476 */ #define CB_CR_OFFSETS_EQUAL 1 /* 477 */ // Implicit uniforms: /* 478 */ // uniform sampler2D eff12_tex_y; /* 479 */ // uniform sampler2D eff12_tex_cbcr; // If CB_CR_SAME_TEXTURE. /* 480 */ // uniform sampler2D eff12_tex_cb; // If not CB_CR_SAME_TEXTURE. /* 481 */ // uniform sampler2D eff12_tex_cr; // If not CB_CR_SAME_TEXTURE. /* 482 */ // uniform mat3 eff12_ycbcr_matrix; /* 483 */ // uniform vec3 eff12_offset; /* 484 */ // uniform vec2 eff12_cb_offset; /* 485 */ // uniform vec2 eff12_cr_offset; /* 486 */ /* 487 */ vec4 FUNCNAME(vec2 tc) { /* 488 */ // OpenGL's origin is bottom-left, but most graphics software assumes /* 489 */ // a top-left origin. Thus, for inputs that come from the user, /* 490 */ // we flip the y coordinate. /* 491 */ tc.y = 1.0 - tc.y; /* 492 */ /* 493 */ vec3 ycbcr; /* 494 */ #if Y_CB_CR_SAME_TEXTURE /* 495 */ ycbcr = tex2D(eff12_tex_y, tc).xyz; /* 496 */ #else /* 497 */ ycbcr.x = tex2D(eff12_tex_y, tc).x; /* 498 */ #if CB_CR_SAME_TEXTURE /* 499 */ #if CB_CR_OFFSETS_EQUAL /* 500 */ ycbcr.yz = tex2D(eff12_tex_cbcr, tc + eff12_cb_offset).xy; /* 501 */ #else /* 502 */ ycbcr.y = tex2D(eff12_tex_cbcr, tc + eff12_cb_offset).x; /* 503 */ ycbcr.z = tex2D(eff12_tex_cbcr, tc + eff12_cr_offset).x; /* 504 */ #endif /* 505 */ #else /* 506 */ ycbcr.y = tex2D(eff12_tex_cb, tc + eff12_cb_offset).x; /* 507 */ ycbcr.z = tex2D(eff12_tex_cr, tc + eff12_cr_offset).x; /* 508 */ #endif /* 509 */ #endif /* 510 */ /* 511 */ ycbcr -= eff12_offset; /* 512 */ /* 513 */ vec4 rgba; /* 514 */ rgba.rgb = eff12_inv_ycbcr_matrix * ycbcr; /* 515 */ rgba.a = 1.0; /* 516 */ return rgba; /* 517 */ } /* 518 */ #undef CB_CR_SAME_TEXTURE /* 519 */ #undef Y_CB_CR_SAME_TEXTURE /* 520 */ #undef FUNCNAME /* 521 */ /* 522 */ #define INPUT eff12 /* 523 */ /* 524 */ #define FUNCNAME eff13 /* 525 */ // Expand gamma curve. /* 526 */ /* 527 */ // Implicit uniforms: /* 528 */ // uniform float eff13_linear_scale; /* 529 */ // uniform float eff13_c[5]; /* 530 */ // uniform float eff13_beta; /* 531 */ /* 532 */ vec4 FUNCNAME(vec2 tc) { /* 533 */ vec4 x = INPUT(tc); /* 534 */ /* 535 */ vec3 a = x.rgb * eff13_linear_scale; /* 536 */ /* 537 */ // Fourth-order polynomial approximation to pow(). See the .cpp file for details. /* 538 */ vec3 b = eff13_c[0] + (eff13_c[1] + (eff13_c[2] + (eff13_c[3] + eff13_c[4] * x.rgb) * x.rgb) * x.rgb) * x.rgb; /* 539 */ /* 540 */ vec3 f = vec3(greaterThan(x.rgb, vec3(eff13_beta))); /* 541 */ x = vec4(mix(a, b, f), x.a); /* 542 */ /* 543 */ return x; /* 544 */ } /* 545 */ #undef FUNCNAME /* 546 */ #undef INPUT /* 547 */ /* 548 */ #define INPUT eff13 /* 549 */ /* 550 */ #define FUNCNAME eff14 /* 551 */ const mat3 eff14_conversion_matrix = mat3( /* 552 */ 9.99894857e-01, 8.33598905e-05, 2.41046644e-05, /* 553 */ -4.85722573e-17, 9.99956206e-01, -3.81639165e-17, /* 554 */ -6.64767369e-05, 5.53508065e-06, 1.00003448e+00); /* 555 */ /* 556 */ // Colorspace conversion (needs to be done in linear space). /* 557 */ // The matrix is computed on the host and baked into the shader at compile time. /* 558 */ /* 559 */ vec4 FUNCNAME(vec2 tc) { /* 560 */ vec4 x = INPUT(tc); /* 561 */ x.rgb = eff14_conversion_matrix * x.rgb; /* 562 */ return x; /* 563 */ } /* 564 */ #undef FUNCNAME /* 565 */ #undef INPUT /* 566 */ /* 567 */ #define INPUT1 eff2 /* 568 */ #define INPUT2 eff5 /* 569 */ #define INPUT3 eff8 /* 570 */ #define INPUT4 eff11 /* 571 */ #define INPUT5 eff14 /* 572 */ /* 573 */ #define FUNCNAME eff15 /* 574 */ #define NORMALIZE_TEXTURE_COORDS(tc) ((tc) * eff15_inv_output_size + eff15_output_texcoord_adjust) /* 575 */ #define YADIF_ENABLE_SPATIAL_INTERLACING_CHECK 0 /* 576 */ UNCNAME(vec2 tc) { /* 577 */ return INPUT(tc) * eff15_factor; /* 578 */ } /* 579 */ // Implicit uniforms: /* 580 */ // uniform int eff15_current_field_position; /* 581 */ // uniform float eff15_inv_width; /* 582 */ // uniform float eff15_inv_height; /* 583 */ // uniform float eff15_current_field_vertical_offset; /* 584 */ /* 585 */ // Compute shader implementation of DeinterlaceEffect. See the fragment /* 586 */ // shader implementation (deinterlace_effect.frag) for comments about the /* 587 */ // algorithm; comments here will mainly be about issues specific to the /* 588 */ // compute shader implementation. /* 589 */ /* 590 */ #define DIFF(s1, s2) dot((s1) - (s2), (s1) - (s2)) /* 591 */ /* 592 */ // In input pixels (so output will be 8x32). Corresponds to get_compute_dimensions() /* 593 */ // in the C++ code. It is illogical that 8x32 would be better than e.g. 32x8, /* 594 */ // since we reuse more data horizontally, but especially Intel cards are much more /* 595 */ // happy about this for whatever reason. /* 596 */ #define GROUP_W 8 /* 597 */ #define GROUP_H 16 /* 598 */ /* 599 */ // When sampling from the current field (spatial interpolation below), we have /* 600 */ // a fringe of three pixels on the left and right sides, so we need to load /* 601 */ // more. We also have one pixel above and below, although our destination pixel /* 602 */ // is squeezed in the middle of them (they don't overlap), so we only need one /* 603 */ // extra pixel. /* 604 */ #define GROUP_W_FRINGE (GROUP_W + 6) /* 605 */ #define GROUP_H_FRINGE (GROUP_H + 1) /* 606 */ /* 607 */ layout(local_size_x = GROUP_W, local_size_y = GROUP_H) in; /* 608 */ /* 609 */ #if (GROUP_W_FRINGE * GROUP_H_FRINGE) > (GROUP_W * (GROUP_H + 2)) /* 610 */ #define TEMP_NUM_ELEM (GROUP_W_FRINGE * GROUP_H_FRINGE) /* 611 */ #else /* 612 */ #define TEMP_NUM_ELEM (GROUP_W * (GROUP_H + 2)) /* 613 */ #endif /* 614 */ /* 615 */ shared vec4 temp[TEMP_NUM_ELEM]; /* 616 */ /* 617 */ #if TEMP_NUM_ELEM > (GROUP_W * GROUP_H * 2) /* 618 */ #error Not enough threads to load all data in two loads /* 619 */ #endif /* 620 */ /* 621 */ // Load a WxH block of samples. We need to do this in two phases, /* 622 */ // since we have more input samples than we have output samples (threads); /* 623 */ // in the second phase, some threads will be idle. /* 624 */ #define LOAD_PIXEL_BLOCK(base_tc, block_width, block_height, func) \ /* 625 */ { \ /* 626 */ memoryBarrierShared(); \ /* 627 */ barrier(); \ /* 628 */ int thread_id = int(gl_LocalInvocationID.y) * GROUP_W + int(gl_LocalInvocationID.x); \ /* 629 */ { \ /* 630 */ int x = thread_id % (block_width); \ /* 631 */ int y = thread_id / (block_width); \ /* 632 */ temp[thread_id] = func(vec2((base_tc).x + x * eff15_inv_width, \ /* 633 */ (base_tc).y + y * eff15_inv_height)); \ /* 634 */ } \ /* 635 */ const int num_threads = GROUP_W * GROUP_H; \ /* 636 */ if (thread_id + num_threads < (block_width) * (block_height)) { \ /* 637 */ int x = (thread_id + num_threads) % (block_width); \ /* 638 */ int y = (thread_id + num_threads) / (block_width); \ /* 639 */ temp[thread_id + num_threads] = \ /* 640 */ func(vec2((base_tc).x + x * eff15_inv_width, \ /* 641 */ (base_tc).y + y * eff15_inv_height)); \ /* 642 */ } \ /* 643 */ memoryBarrierShared(); \ /* 644 */ barrier(); \ /* 645 */ } /* 646 */ /* 647 */ void FUNCNAME() { /* 648 */ // The current thread is responsible for output of two pixels, namely (x,2y) /* 649 */ // and (x,2y+1). One will be an unmodified one, the other one will be the /* 650 */ // pixel we are trying to interpolate. If TFF (current_field_position==0), /* 651 */ // the unmodified one is 2y+1 (remember OpenGL's bottom-left convention), /* 652 */ // and if BFF, the unmodified one is 2y. So we need to invert current_field_position /* 653 */ // to figure out which value to add. /* 654 */ int yi = int(gl_GlobalInvocationID.y) * 2 + (eff15_current_field_position ^ 1); /* 655 */ /* 656 */ // Load in data for the current field. current_offset signals where the block /* 657 */ // starts vertically; see set_gl_state() in the C++ code. /* 658 */ vec2 base_tc = vec2((gl_WorkGroupID.x * uint(GROUP_W) + (0.5f - 3.0f)) * eff15_inv_width, /* 659 */ (gl_WorkGroupID.y * uint(GROUP_H) + 0.5f) * eff15_inv_height + eff15_current_field_vertical_offset); /* 660 */ LOAD_PIXEL_BLOCK(base_tc, GROUP_W_FRINGE, GROUP_H_FRINGE, INPUT3); /* 661 */ /* 662 */ int lx = int(gl_LocalInvocationID.x) + 3; /* 663 */ int ly = int(gl_LocalInvocationID.y); /* 664 */ /* 665 */ // Output the unmodified pixel. For TFF (current_field_position == 0), /* 666 */ // we have an extra pixel on the bottom that we're only using for interpolation /* 667 */ // (it's being output by another workgroup), so we have to add 1. /* 668 */ vec4 val = temp[(ly + (eff15_current_field_position ^ 1)) * GROUP_W_FRINGE + lx]; /* 669 */ OUTPUT(ivec2(gl_GlobalInvocationID.x, yi), val); /* 670 */ /* 671 */ // a b c d e f g 261 y /* 672 */ // x | /* 673 */ // h i j k l m n +--> x /* 674 */ /* 675 */ vec4 a = temp[(ly + 1) * GROUP_W_FRINGE + lx - 3]; /* 676 */ vec4 b = temp[(ly + 1) * GROUP_W_FRINGE + lx - 2]; /* 677 */ vec4 c = temp[(ly + 1) * GROUP_W_FRINGE + lx - 1]; /* 678 */ vec4 d = temp[(ly + 1) * GROUP_W_FRINGE + lx]; /* 679 */ vec4 e = temp[(ly + 1) * GROUP_W_FRINGE + lx + 1]; /* 680 */ vec4 f = temp[(ly + 1) * GROUP_W_FRINGE + lx + 2]; /* 681 */ vec4 g = temp[(ly + 1) * GROUP_W_FRINGE + lx + 3]; /* 682 */ /* 683 */ vec4 h = temp[ly * GROUP_W_FRINGE + lx - 3]; /* 684 */ vec4 i = temp[ly * GROUP_W_FRINGE + lx - 2]; /* 685 */ vec4 j = temp[ly * GROUP_W_FRINGE + lx - 1]; /* 686 */ vec4 k = temp[ly * GROUP_W_FRINGE + lx]; /* 687 */ vec4 l = temp[ly * GROUP_W_FRINGE + lx + 1]; /* 688 */ vec4 m = temp[ly * GROUP_W_FRINGE + lx + 2]; /* 689 */ vec4 n = temp[ly * GROUP_W_FRINGE + lx + 3]; /* 690 */ /* 691 */ // 0 degrees. /* 692 */ vec4 pred = d + k; /* 693 */ float score; /* 694 */ float best_score = DIFF(c, j) + DIFF(d, k) + DIFF(e, l) - 1e-4; /* 695 */ /* 696 */ // -45 degrees. /* 697 */ score = DIFF(b, k) + DIFF(c, l) + DIFF(d, m); /* 698 */ if (score < best_score) { /* 699 */ pred = c + l; /* 700 */ best_score = score; /* 701 */ } /* 702 */ /* 703 */ // -63 degrees. /* 704 */ score = DIFF(a, l) + DIFF(b, m) + DIFF(c, n); /* 705 */ if (score < best_score) { /* 706 */ pred = b + m; /* 707 */ best_score = score; /* 708 */ } /* 709 */ /* 710 */ // +45 degrees. /* 711 */ score = DIFF(d, i) + DIFF(e, j) + DIFF(f, k); /* 712 */ if (score < best_score) { /* 713 */ pred = e + j; /* 714 */ best_score = score; /* 715 */ } /* 716 */ /* 717 */ // +63 degrees. /* 718 */ score = DIFF(e, h) + DIFF(f, i) + DIFF(g, j); /* 719 */ if (score < best_score) { /* 720 */ pred = f + i; /* 721 */ // best_score isn't used anymore. /* 722 */ } /* 723 */ /* 724 */ pred *= 0.5f; /* 725 */ /* 726 */ // Temporal prediction (p2) of this pixel based on the previous and next fields. /* 727 */ // /* 728 */ // 261 y /* 729 */ // C H | /* 730 */ // A F K | /* 731 */ // D x I | /* 732 */ // B G L | /* 733 */ // E J | /* 734 */ // +-----> time /* 735 */ // /* 736 */ // x is obviously aligned with D and I, so we don't need texcoord /* 737 */ // adjustment for top/bottom field here, unlike earlier. However, we need /* 738 */ // to start the block one pixel below since we need E/J, thus the -1 in /* 739 */ // the y coordinate. /* 740 */ base_tc = vec2((gl_WorkGroupID.x * uint(GROUP_W) + 0.5f) * eff15_inv_width, /* 741 */ (gl_WorkGroupID.y * uint(GROUP_H) + (0.5f - 1.0f)) * eff15_inv_height); /* 742 */ lx = int(gl_LocalInvocationID.x); /* 743 */ #if YADIF_ENABLE_SPATIAL_INTERLACING_CHECK /* 744 */ LOAD_PIXEL_BLOCK(base_tc, GROUP_W, GROUP_H + 2, INPUT2); /* 745 */ vec4 C = temp[(ly + 2) * GROUP_W + lx]; /* 746 */ vec4 D = temp[(ly + 1) * GROUP_W + lx]; /* 747 */ vec4 E = temp[ ly * GROUP_W + lx]; /* 748 */ /* 749 */ LOAD_PIXEL_BLOCK(base_tc, GROUP_W, GROUP_H + 2, INPUT4); /* 750 */ vec4 H = temp[(ly + 2) * GROUP_W + lx]; /* 751 */ vec4 I = temp[(ly + 1) * GROUP_W + lx]; /* 752 */ vec4 J = temp[ ly * GROUP_W + lx]; /* 753 */ #else /* 754 */ // Since spatial interlacing check is not enabled, we only need D /* 755 */ // and I from the previous and next fields; since they are not shared /* 756 */ // between the neighboring pixels, they can be straight-up loads. /* 757 */ vec2 DI_pos = vec2((gl_GlobalInvocationID.x + 0.5f) * eff15_inv_width, /* 758 */ (gl_GlobalInvocationID.y + 0.5f) * eff15_inv_height); /* 759 */ vec4 D = INPUT2(DI_pos); /* 760 */ vec4 I = INPUT4(DI_pos); /* 761 */ #endif /* 762 */ /* 763 */ // Load what we need from the previous field into shared memory, /* 764 */ // since A/B can be reused between neighboring pixels. We need one /* 765 */ // line above/below, but we don't need the horizontal fringe. /* 766 */ LOAD_PIXEL_BLOCK(base_tc, GROUP_W, GROUP_H + 1, INPUT1); /* 767 */ vec4 A = temp[(ly + 1) * GROUP_W + lx]; /* 768 */ vec4 B = temp[ ly * GROUP_W + lx]; /* 769 */ /* 770 */ // What we need from the current field was loaded earlier. /* 771 */ vec4 F = d; /* 772 */ vec4 G = k; /* 773 */ /* 774 */ // Next field. /* 775 */ LOAD_PIXEL_BLOCK(base_tc, GROUP_W, GROUP_H + 1, INPUT5); /* 776 */ vec4 K = temp[(ly + 1) * GROUP_W + lx]; /* 777 */ vec4 L = temp[ ly * GROUP_W + lx]; /* 778 */ /* 779 */ // Find temporal differences around this line. /* 780 */ vec4 tdiff0 = abs(D - I); /* 781 */ vec4 tdiff1 = abs(A - F) + abs(B - G); // Actually twice tdiff1. /* 782 */ vec4 tdiff2 = abs(K - F) + abs(L - G); // Actually twice tdiff2. /* 783 */ vec4 diff = max(tdiff0, 0.5f * max(tdiff1, tdiff2)); /* 784 */ /* 785 */ #if YADIF_ENABLE_SPATIAL_INTERLACING_CHECK /* 786 */ // Spatial interlacing check. /* 787 */ // We start by temporally interpolating the current vertical line (p0203p4): /* 788 */ // /* 789 */ // C p0 H 261 y /* 790 */ // p1 | /* 791 */ // D p2 I | /* 792 */ // p3 | /* 793 */ // E p4 J +-----> time /* 794 */ // /* 795 */ vec4 p0 = 0.5f * (C + H); /* 796 */ vec4 p1 = F; /* 797 */ vec4 p2 = 0.5f * (D + I); /* 798 */ vec4 p3 = G; /* 799 */ vec4 p4 = 0.5f * (E + J); /* 800 */ /* 801 */ vec4 max_ = max(max(p2 - p3, p2 - p1), min(p0 - p1, p4 - p3)); /* 802 */ vec4 min_ = min(min(p2 - p3, p2 - p1), max(p0 - p1, p4 - p3)); /* 803 */ diff = max(diff, max(min_, -max_)); /* 804 */ #else /* 805 */ vec4 p2 = 0.5f * (D + I); /* 806 */ #endif /* 807 */ /* 808 */ val = clamp(pred, p2 - diff, p2 + diff); /* 809 */ OUTPUT(ivec2(gl_GlobalInvocationID.x, yi ^ 1), val); /* 810 */ } /* 811 */ /* 812 */ #undef LOAD_P#undef FUNCNAME /* 813 */ #undef INPUT1 /* 814 */ #undef INPUT2 /* 815 */ #undef INPUT3 /* 816 */ #undef INPUT4 /* 817 */ #undef INPUT5 /* 818 */ /* 819 */ #define INPUT eff15 /* 820 */ #define CS_POSTPROC(tc) CS_OUTPUT_VAL /* 821 */ // GLSL is pickier than the C++ preprocessor in if-testing for undefined /* 822 */ // tokens; do some fixups here to keep it happy. /* 823 */ /* 824 */ #ifndef SQUARE_ROOT_TRANSFORMATION /* 825 */ #define SQUARE_ROOT_TRANSFORMATION 0 /* 826 */ #endif /* 827 */ /* 828 */ #ifndef FLIP_ORIGIN /* 829 */ #define FLIP_ORIGIN 0 /* 830 */ #endif /* 831 */ /* 832 */ void main() /* 833 */ { /* 834 */ INPUT(); /* 835 */ } /* 836 */ /* 837 */ vec4 tex2D(sampler2D s, vec2 coord) /* 838 */ { /* 839 */ return texture(s, coord); /* 840 */ } /* 841 */ /* 842 */ void cs_output(uvec2 coord, vec4 val) /* 843 */ { /* 844 */ cs_output(ivec2(coord), val); /* 845 */ } /* 846 */ /* 847 */ void cs_output(ivec2 coord, vec4 val) /* 848 */ { /* 849 */ // Run the value through any postprocessing steps we might have. /* 850 */ // Note that we need to give in the actual coordinates, since the /* 851 */ // effect could have multiple (non-compute) inputs, and would also /* 852 */ // be allowed to make effects based on the texture coordinate alone. /* 853 */ CS_OUTPUT_VAL = val; /* 854 */ val = CS_POSTPROC(NORMALIZE_TEXTURE_COORDS(coord)); /* 855 */ /* 856 */ #if SQUARE_ROOT_TRANSFORMATION /* 857 */ // Make sure we don't give negative values to sqrt. /* 858 */ val.rgb = sqrt(max(val.rgb, 0.0)); /* 859 */ #endif /* 860 */ /* 861 */ #if FLIP_ORIGIN /* 862 */ coord.y = imageSize(tex_outbuf).y - coord.y - 1; /* 863 */ #endif /* 864 */ /* 865 */ imageStore(tex_outbuf, coord, val); /* 866 */ } /* 867 */ -- System Information: Debian Release: trixie/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 6.3.0-1-amd64 (SMP w/16 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages libmovit8 depends on: ii libc6 2.37-5 ii libepoxy0 1.5.10-1 ii libfftw3-double3 3.3.10-1 ii libgcc-s1 13.1.0-6 ii libstdc++6 13.1.0-6 libmovit8 recommends no packages. libmovit8 suggests no packages. -- no debconf information