Advertisement
KunalA18

qcam -r gles output without any changes

Jun 27th, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 6.42 KB | None | 0 0
  1. pi@raspberrypi:~/Desktop/GSOC/libcamera/build/src/qcam $ ./qcam -r gles
  2. [0:20:05.166908550] [1352]  INFO IPAManager ipa_manager.cpp:138 libcamera is not installed. Adding '/home/pi/Desktop/GSOC/libcamera/build/src/ipa' to the IPA search path
  3. [0:20:05.170485444] [1352]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3618-dfcf638a-dirty (2022-06-25T13:45:48+05:30)
  4. [0:20:05.180802513] [1354] ERROR CameraSensor camera_sensor.cpp:591 'ov5647 10-0036': Camera sensor does not support test pattern modes.
  5. Stream configuration adjusted to  640x480-SGBRG8
  6. [0:20:05.236720357] [1352]  INFO Camera camera.cpp:1029 configuring streams: (0) 640x480-SGBRG8
  7. QOpenGLShader::compile(Fragment): 0:22(1): error: No precision specified in this scope for type `vec4'
  8. 0:23(1): error: No precision specified in this scope for type `vec4'
  9. 0:24(1): error: No precision specified in this scope for type `vec4'
  10. 0:29(2): error: No precision specified in this scope for type `float'
  11. 0:30(2): error: No precision specified in this scope for type `vec4'
  12. 0:33(2): error: No precision specified in this scope for type `vec2'
  13. 0:35(2): error: No precision specified in this scope for type `vec4'
  14. 0:41(2): error: No precision specified in this scope for type `vec4'
  15. 0:49(2): error: No precision specified in this scope for type `vec4'
  16. 0:55(2): error: No precision specified in this scope for type `vec4'
  17. 0:65(2): error: No precision specified in this scope for type `vec4'
  18. 0:66(2): error: No precision specified in this scope for type `vec4'
  19. 0:67(2): error: No precision specified in this scope for type `vec4'
  20.  
  21. *** Problematic Fragment shader source code ***
  22. #ifdef GL_KHR_blend_equation_advanced
  23. #extension GL_ARB_fragment_coord_conventions : enable
  24. #extension GL_KHR_blend_equation_advanced : enable
  25. #endif
  26. #ifndef GL_FRAGMENT_PRECISION_HIGH
  27. #define highp mediump
  28. #endif
  29. #line 1
  30.  
  31. /* SPDX-License-Identifier: BSD-2-Clause */
  32. /*
  33. From http://jgt.akpeters.com/papers/McGuire08/
  34.  
  35. Efficient, High-Quality Bayer Demosaic Filtering on GPUs
  36.  
  37. Morgan McGuire
  38.  
  39. This paper appears in issue Volume 13, Number 4.
  40. ---------------------------------------------------------
  41. Copyright (c) 2008, Morgan McGuire. All rights reserved.
  42.  
  43. Modified by Linaro Ltd to integrate it into libcamera.
  44. Copyright (C) 2021, Linaro
  45. */
  46.  
  47. //Pixel Shader
  48.  
  49. /** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/
  50. uniform sampler2D       tex_y;
  51. varying vec4            center;
  52. varying vec4            yCoord;
  53. varying vec4            xCoord;
  54.  
  55. void main(void) {
  56.    #define fetch(x, y) texture2D(tex_y, vec2(x, y)).r
  57.  
  58.    float C = texture2D(tex_y, center.xy).r; // ( 0, 0)
  59.    const vec4 kC = vec4( 4.0,  6.0,  5.0,  5.0) / 8.0;
  60.  
  61.    // Determine which of four types of pixels we are on.
  62.    vec2 alternate = mod(floor(center.zw), 2.0);
  63.  
  64.    vec4 Dvec = vec4(
  65.        fetch(xCoord[1], yCoord[1]),  // (-1,-1)
  66.        fetch(xCoord[1], yCoord[2]),  // (-1, 1)
  67.        fetch(xCoord[2], yCoord[1]),  // ( 1,-1)
  68.        fetch(xCoord[2], yCoord[2])); // ( 1, 1)
  69.  
  70.    vec4 PATTERN = (kC.xyz * C).xyzz;
  71.  
  72.    // Can also be a dot product with (1,1,1,1) on hardware where that is
  73.    // specially optimized.
  74.    // Equivalent to: D = Dvec[0] + Dvec[1] + Dvec[2] + Dvec[3];
  75.    Dvec.xy += Dvec.zw;
  76.    Dvec.x  += Dvec.y;
  77.  
  78.    vec4 value = vec4(
  79.        fetch(center.x, yCoord[0]),   // ( 0,-2)
  80.        fetch(center.x, yCoord[1]),   // ( 0,-1)
  81.        fetch(xCoord[0], center.y),   // (-2, 0)
  82.        fetch(xCoord[1], center.y));  // (-1, 0)
  83.  
  84.    vec4 temp = vec4(
  85.        fetch(center.x, yCoord[3]),   // ( 0, 2)
  86.        fetch(center.x, yCoord[2]),   // ( 0, 1)
  87.        fetch(xCoord[3], center.y),   // ( 2, 0)
  88.        fetch(xCoord[2], center.y));  // ( 1, 0)
  89.  
  90.    // Even the simplest compilers should be able to constant-fold these to
  91.    // avoid the division.
  92.    // Note that on scalar processors these constants force computation of some
  93.    // identical products twice.
  94.    const vec4 kA = vec4(-1.0, -1.5,  0.5, -1.0) / 8.0;
  95.    const vec4 kB = vec4( 2.0,  0.0,  0.0,  4.0) / 8.0;
  96.    const vec4 kD = vec4( 0.0,  2.0, -1.0, -1.0) / 8.0;
  97.  
  98.    // Conserve constant registers and take advantage of free swizzle on load
  99.    #define kE (kA.xywz)
  100.    #define kF (kB.xywz)
  101.  
  102.    value += temp;
  103.  
  104.    // There are five filter patterns (identity, cross, checker,
  105.    // theta, phi).  Precompute the terms from all of them and then
  106.    // use swizzles to assign to color channels.
  107.    //
  108.    // Channel   Matches
  109.    //   x       cross   (e.g., EE G)
  110.    //   y       checker (e.g., EE B)
  111.    //   z       theta   (e.g., EO R)
  112.    //   w       phi     (e.g., EO R)
  113.    #define A (value[0])
  114.    #define B (value[1])
  115.    #define D (Dvec.x)
  116.    #define E (value[2])
  117.    #define F (value[3])
  118.  
  119.    // Avoid zero elements. On a scalar processor this saves two MADDs
  120.    // and it has no effect on a vector processor.
  121.    PATTERN.yzw += (kD.yz * D).xyy;
  122.  
  123.    PATTERN += (kA.xyz * A).xyzx + (kE.xyw * E).xyxz;
  124.    PATTERN.xw  += kB.xw * B;
  125.    PATTERN.xz  += kF.xz * F;
  126.  
  127.    gl_FragColor.rgb = (alternate.y == 0.0) ?
  128.        ((alternate.x == 0.0) ?
  129.            vec3(C, PATTERN.xy) :
  130.            vec3(PATTERN.z, C, PATTERN.w)) :
  131.        ((alternate.x == 0.0) ?
  132.            vec3(PATTERN.w, C, PATTERN.z) :
  133.            vec3(PATTERN.yx, C));
  134. }
  135.  
  136. ***
  137. [ViewFinderGL]: "0:22(1): error: No precision specified in this scope for type `vec4'\n0:23(1): error: No precision specified in this scope for type `vec4'\n0:24(1): error: No precision specified in this scope for type `vec4'\n0:29(2): error: No precision specified in this scope for type `float'\n0:30(2): error: No precision specified in this scope for type `vec4'\n0:33(2): error: No precision specified in this scope for type `vec2'\n0:35(2): error: No precision specified in this scope for type `vec4'\n0:41(2): error: No precision specified in this scope for type `vec4'\n0:49(2): error: No precision specified in this scope for type `vec4'\n0:55(2): error: No precision specified in this scope for type `vec4'\n0:65(2): error: No precision specified in this scope for type `vec4'\n0:66(2): error: No precision specified in this scope for type `vec4'\n0:67(2): error: No precision specified in this scope for type `vec4'\n"
  138. [ViewFinderGL]: create fragment shader failed.
  139. qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 192, resource id: 0, major code: 140 (Unknown), minor code: 20
  140. libpng warning: iCCP: known incorrect sRGB profile
  141. Segmentation fault
  142.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement