]> git.sesse.net Git - nageru/commitdiff
Various indent fixes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 13 May 2024 21:51:43 +0000 (23:51 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 13 May 2024 21:51:43 +0000 (23:51 +0200)
15 files changed:
nageru/analyzer.cpp
nageru/av1_encoder.cpp
nageru/benchmark_audio_mixer.cpp
nageru/correlation_measurer.cpp
nageru/ffmpeg_capture.cpp
nageru/filter.cpp
nageru/midi_mapper.cpp
nageru/midi_mapping_dialog.cpp
nageru/mixer.cpp
nageru/pbo_frame_allocator.cpp
nageru/resampling_queue.cpp
nageru/theme.cpp
nageru/timecode_renderer.cpp
nageru/v210_converter.cpp
nageru/x264_dynamic.cpp

index 5ee873be9cce81e5fb19009009684987558b1273..a9bfb6da25147f2ff01f067b928695f62e8ed480 100644 (file)
@@ -71,9 +71,9 @@ Analyzer::Analyzer()
        signal_changed();
        ui->grabbed_frame_label->installEventFilter(this);
 
-        glGenBuffers(1, &pbo);
-        glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, pbo);
-        glBufferData(GL_PIXEL_PACK_BUFFER_ARB, global_flags.width * global_flags.height * 4, nullptr, GL_STREAM_READ);
+       glGenBuffers(1, &pbo);
+       glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, pbo);
+       glBufferData(GL_PIXEL_PACK_BUFFER_ARB, global_flags.width * global_flags.height * 4, nullptr, GL_STREAM_READ);
 }
 
 Analyzer::~Analyzer()
@@ -238,7 +238,7 @@ bool Analyzer::eventFilter(QObject *watched, QEvent *event)
                ui->blue_label->setText(u8"—");
                ui->hex_label->setText(u8"#—");
        }
-        return false;
+       return false;
 }
 
 void Analyzer::grab_pixel(int x, int y)
index 13f0e30e3e9162fd5689883290d448205ae07e22..bb6c17be145f71e04913fd23811c217f31c90738 100644 (file)
@@ -212,7 +212,7 @@ void AV1Encoder::init_av1()
                global_headers = string(reinterpret_cast<const char *>(header->p_buffer), header->n_filled_len);
 
                svt_av1_enc_stream_header_release(header);  // Don't care about errors.
-          }
+       }
 }
 
 void AV1Encoder::encoder_thread_func()
index 935295b3bee3ac8996e3122ac0387345f8654738..9eefc73ed4e2ca31220f5a8737688e4774c944f9 100644 (file)
@@ -51,9 +51,9 @@ void reset_lcgrand()
 
 void callback(float level_lufs, float peak_db,
               std::vector<AudioMixer::BusLevel> bus_levels,
-             float global_level_lufs, float range_low_lufs, float range_high_lufs,
-             float final_makeup_gain_db,
-             float correlation)
+              float global_level_lufs, float range_low_lufs, float range_high_lufs,
+              float final_makeup_gain_db,
+              float correlation)
 {
        // Empty.
 }
index 6be16b88b0ad53ebc840afdcb9aabc415ad16610..0fa4749cbba3a849a0f2b329b7849dec0f3ba30e 100644 (file)
@@ -28,7 +28,7 @@ using namespace std;
 
 CorrelationMeasurer::CorrelationMeasurer(unsigned sample_rate,
                                          float lowpass_cutoff_hz,
-                                        float falloff_seconds)
+                                         float falloff_seconds)
     : w1(2.0 * M_PI * lowpass_cutoff_hz / sample_rate),
       w2(1.0 / (falloff_seconds * sample_rate))
 {
index b00cab614c2315681309a6963110f182ba485117..14ad91f0c64baa01b686680baada50d7b5d96977 100644 (file)
@@ -1116,9 +1116,9 @@ void FFmpegCapture::convert_audio(const AVFrame *audio_avframe, FrameAllocator::
        int out_samples = swr_convert(resampler, &data, num_samples_room,
                const_cast<const uint8_t **>(audio_avframe->data), audio_avframe->nb_samples);
        if (out_samples < 0) {
-                fprintf(stderr, "Audio conversion failed.\n");
-                abort();
-        }
+               fprintf(stderr, "Audio conversion failed.\n");
+               abort();
+       }
 
        audio_frame->len += out_samples * bytes_per_sample;
 }
index 835ec6c887b191cd13a28ed02d00a823dd45633b..e4669515fab73d0298d83b8fd303d876f64da5ac 100644 (file)
@@ -23,8 +23,8 @@ using namespace std;
 #else  // !defined(__SSE__)
 
 union uint_float {
-        float f;
-        unsigned int i;
+       float f;
+       unsigned int i;
 };
 #define early_undenormalise(sample) { \
         uint_float uf; \
index 2fd6dbb9ab04c11e72fb9c8efb1f97125c128f74..e7b9068ef500b958e2af39e28a8aa33480e2f100 100644 (file)
@@ -49,7 +49,7 @@ void MIDIMapper::set_midi_mapping(const MIDIMappingProto &new_mapping)
        }
 
        num_controller_banks = min(max(mapping_proto->num_controller_banks(), 1), 5);
-        current_controller_bank = 0;
+       current_controller_bank = 0;
 
        receiver->clear_all_highlights();
        update_highlights();
index 76776d2205ad454a92fb65dc7e53d1697d6eceb6..2fa8fbe891a7f69abdbb4b0686e5a82908eb70db 100644 (file)
@@ -158,7 +158,7 @@ int get_light_mapping(const MIDIMappingProto &mapping_proto, size_t bus_idx, int
 
 MIDIMappingDialog::MIDIMappingDialog(MIDIMapper *mapper)
        : ui(new Ui::MIDIMappingDialog),
-          mapper(mapper)
+         mapper(mapper)
 {
        ui->setupUi(this);
 
index e766d8864d89023d2d451bc75107ef1d5630c340..b986ed5fd8c28698346c279d6ebd1108c40539cf 100644 (file)
@@ -809,7 +809,7 @@ int unwrap_timecode(uint16_t current_wrapped, int last)
 
 void Mixer::bm_frame(unsigned card_index, uint16_t timecode,
                      FrameAllocator::Frame video_frame, size_t video_offset, VideoFormat video_format,
-                    FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format)
+                     FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format)
 {
        DeviceSpec device{InputSourceType::CAPTURE_CARD, card_index};
        CaptureCard *card = &cards[card_index];
index a649232edb91ff935f0f62cc737243bdbef374a4..6ebe13ae4d6f731e7348dc5f6dbcd0e61fefaedb 100644 (file)
@@ -35,7 +35,7 @@ void set_clamp_to_edge()
 }  // namespace
 
 PBOFrameAllocator::PBOFrameAllocator(bmusb::PixelFormat pixel_format, size_t frame_size, GLuint width, GLuint height, unsigned card_index, MJPEGEncoder *mjpeg_encoder, size_t num_queued_frames, GLenum buffer, GLenum permissions, GLenum map_bits)
-        : card_index(card_index),
+       : card_index(card_index),
          mjpeg_encoder(mjpeg_encoder),
          pixel_format(pixel_format),
          buffer(buffer),
@@ -281,7 +281,7 @@ void PBOFrameAllocator::destroy_frame(Frame *frame)
 
 bmusb::FrameAllocator::Frame PBOFrameAllocator::alloc_frame()
 {
-        Frame vf;
+       Frame vf;
 
        lock_guard<mutex> lock(freelist_mutex);  // Meh.
        if (freelist.empty()) {
@@ -309,7 +309,7 @@ bmusb::FrameAllocator::Frame PBOFrameAllocator::alloc_frame()
 
 bmusb::FrameAllocator::Frame PBOFrameAllocator::create_frame(size_t width, size_t height, size_t stride)
 {
-        Frame vf;
+       Frame vf;
 
        size_t desired_frame_bytes = width * stride;
        if (stride > 8192 * 4 || height > 8192 || desired_frame_bytes > MAX_FRAME_SIZE) {
index a7756e4a8ca288f445e2f0af91c3d02c299ee2df..94a8e16161c6da646aa6281c636ab2873efe24cb 100644 (file)
@@ -44,8 +44,8 @@ ResamplingQueue::ResamplingQueue(const std::string &debug_description, unsigned
 
        // Prime the resampler so there's no more delay.
        vresampler.inp_count = vresampler.inpsize() / 2 - 1;
-        vresampler.out_count = 1048576;
-        vresampler.process ();
+       vresampler.out_count = 1048576;
+       vresampler.process();
 }
 
 void ResamplingQueue::add_input_samples(steady_clock::time_point ts, const float *samples, ssize_t num_samples, ResamplingQueue::RateAdjustmentPolicy rate_adjustment_policy)
index afef822fe3666015b49450477e0a1b3ac68c2db2..192b27eabbe981581283cc6e111dddd7345134ff 100644 (file)
@@ -124,9 +124,9 @@ InputStateInfo::InputStateInfo(const InputState &input_state)
 // An effect that does nothing.
 class IdentityEffect : public Effect {
 public:
-        IdentityEffect() {}
-        string effect_type_id() const override { return "IdentityEffect"; }
-        string output_fragment_shader() override { return read_file("identity.frag"); }
+       IdentityEffect() {}
+       string effect_type_id() const override { return "IdentityEffect"; }
+       string output_fragment_shader() override { return read_file("identity.frag"); }
 };
 
 Effect *instantiate_effect(EffectChain *chain, EffectType effect_type)
@@ -1527,7 +1527,7 @@ Theme::Theme(const string &filename, const vector<string> &search_dirs, Resource
        channel_names[1] = "Preview";
 
        L = luaL_newstate();
-        luaL_openlibs(L);
+       luaL_openlibs(L);
 
        // Search through all directories until we find a file that will load
        // (as in, does not return LUA_ERRFILE); then run it. We store load errors
index 745e6cab1dbea22678654fb7f1e2c5b00339197d..23d0f001bca520bd638c10e93ba40f058575d590 100644 (file)
@@ -65,11 +65,11 @@ TimecodeRenderer::TimecodeRenderer(movit::ResourcePool *resource_pool, unsigned
 TimecodeRenderer::~TimecodeRenderer()
 {
        resource_pool->release_2d_texture(tex);
-        check_error();
+       check_error();
        resource_pool->release_glsl_program(program_num);
-        check_error();
+       check_error();
        glDeleteBuffers(1, &vbo);
-        check_error();
+       check_error();
 }
 
 string TimecodeRenderer::get_timecode_text(double pts, unsigned frame_num)
@@ -152,15 +152,15 @@ void TimecodeRenderer::render_buffer_to_fbo(GLuint fbo)
        check_error();
 
        glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, display_width, height, GL_RED, GL_UNSIGNED_BYTE, image->bits());
-        check_error();
+       check_error();
 
        glUseProgram(program_num);
        check_error();
        glUniform1i(texture_sampler_uniform, 0);
-        check_error();
+       check_error();
 
-        glBindBuffer(GL_ARRAY_BUFFER, vbo);
-        check_error();
+       glBindBuffer(GL_ARRAY_BUFFER, vbo);
+       check_error();
 
        for (GLint attr_index : { position_attribute_index, texcoord_attribute_index }) {
                if (attr_index == -1) continue;
index b9138af5f7dedb738a0ade89ab2166badf3f6d26..c144952ae17b5946611f88db92dfaec1db2e6da3 100644 (file)
@@ -42,7 +42,7 @@ void v210Converter::precompile_shader(unsigned width)
 
        char buf[16];
        snprintf(buf, sizeof(buf), "%u", num_local_work_groups);
-        string shader_src = R"(#version 150
+       string shader_src = R"(#version 150
 #extension GL_ARB_compute_shader : enable
 #extension GL_ARB_shader_image_load_store : enable
 layout(local_size_x = )" + string(buf) + R"() in;
@@ -144,9 +144,9 @@ void v210Converter::convert(GLuint tex_src, GLuint tex_dst, unsigned width, unsi
        check_error();
        glUniform1i(shader.outbuf_pos, 1);
        check_error();
-        glBindImageTexture(0, tex_src, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGB10_A2);
+       glBindImageTexture(0, tex_src, 0, GL_FALSE, 0, GL_READ_ONLY, GL_RGB10_A2);
        check_error();
-        glBindImageTexture(1, tex_dst, 0, GL_FALSE, 0, GL_WRITE_ONLY, GL_RGB10_A2);
+       glBindImageTexture(1, tex_dst, 0, GL_FALSE, 0, GL_WRITE_ONLY, GL_RGB10_A2);
        check_error();
 
        // Actually run the shader.
index 8cdf42beb57c35843bd615cc28114ad0772f031b..77ba357b0ad60469f61b9d5a85dfa58ca4abe010 100644 (file)
@@ -58,7 +58,7 @@ X264Dynamic load_x264_for_bit_depth(unsigned depth)
                        x264_suffix = string(ptr, (m->l_name + strlen(m->l_name)) - ptr);
                        break;
                }
-        }
+       }
        dlclose(handle);
 
        if (x264_dir.empty()) {