diff --git a/gopro_8:7/preset_gopro_8:7.py b/gopro_8:7/preset_gopro_8:7.py index f3e5b5d..734bebc 100644 --- a/gopro_8:7/preset_gopro_8:7.py +++ b/gopro_8:7/preset_gopro_8:7.py @@ -103,7 +103,7 @@ adm.addVideoFilter( "shaderLoader", "shaderFile=/opt/rk/avidemux/unfish_gopro_8:7.glsl") adm.addVideoFilter( "swscale", - "width=2832", + "width=2468", "height=2160", "algo=2", "sourceAR=0", diff --git a/gopro_8:7/unfish_gopro_8:7.glsl b/gopro_8:7/unfish_gopro_8:7.glsl index 1ef55c9..3fc0b91 100644 --- a/gopro_8:7/unfish_gopro_8:7.glsl +++ b/gopro_8:7/unfish_gopro_8:7.glsl @@ -20,7 +20,7 @@ #define color_conversion #define texture_filtering -//#define rotate_180 +#define rotate_180 //#define debug_borders #undef highp // defined by Qt-OpenGl @@ -37,7 +37,6 @@ uniform float pts; // parameters const vec2 sensor_size = vec2(5.949440, 5.205760); -const vec2 rectilinear_scale = vec2(1.147370, 1.0); const float equidistant_focal_length = 2.920000; const float rectilinear_focal_length = 2.102263; @@ -56,7 +55,7 @@ vec2 sensor_to_texture; void initialize() { texture_center = myResolution * 0.5; - texture_to_sensor = (sensor_size / myResolution) * rectilinear_scale; + texture_to_sensor = (sensor_size / myResolution); #ifdef rotate_180 texture_to_sensor *= -1.0; #endif diff --git a/gopro_8:7/unfish_gopro_8:7.py b/gopro_8:7/unfish_gopro_8:7.py index f3db0b2..d1fe816 100644 --- a/gopro_8:7/unfish_gopro_8:7.py +++ b/gopro_8:7/unfish_gopro_8:7.py @@ -87,26 +87,19 @@ print("linear fov : horizontal = %7.3f, vertical = %7.3f, diagonal = %7.3f (deg print("\n--- shader parameters ---\n") -output_size_horizontal = 2.0 * rectilinear_radius(gopro_fov_horizontal * 0.5) -output_size_vertical = gopro_size_vertical - -output_scale_horizontal = output_size_horizontal / gopro_size_horizontal - print("""// parameters\n const vec2 sensor_size = vec2(%.6f, %.6f); -const vec2 rectilinear_scale = vec2(%.6f, 1.0); const float equidistant_focal_length = %.6f; const float rectilinear_focal_length = %.6f;""" % ( gopro_size_horizontal, gopro_size_vertical, - output_scale_horizontal, gopro_focal_length, rectilinear_focal_length_vertical) ) -print("\n--- filters parameters ---\n") +print("\n--- output size ---\n") def print_output_array(array_vertical): - array_horizontal = (array_vertical / gopro_array_vertical) * gopro_array_horizontal * output_scale_horizontal + array_horizontal = (array_vertical / gopro_array_vertical) * gopro_array_horizontal print("resize: width = %d, height = %d" % ( round(array_horizontal / 4.0) * 4, array_vertical))