[Cin] cinelerra_scale.C
Phyllis Smith
phylsmith2017 at gmail.com
Thu Mar 12 15:23:42 CET 2020
Yes -- good spot. THANKS, keep passing along these mistakes. gg/phyllis
On Thu, Mar 12, 2020 at 3:00 AM Andrew Randrianasulu <
randrianasulu at gmail.com> wrote:
> I have stupid question again...
>
> in file
>
>
> https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=blob;f=cinelerra-5.1/cinelerra/scale.C;h=8c7b49c9a2a68e6564782894f7e3823baf40a1a3;hb=HEAD
>
> I can see such lines:
>
> 60
> 61 void ScaleThread::run()
> 62 {
> 63 if(already_running) return;
> 64 already_running = 1;
> 65 constrain_ratio = mwindow->defaults->get("SCALECONSTRAIN", 0);
> 66 scale_data = mwindow->defaults->get("SCALEDATA", 0);
> 67 auto_aspect = mwindow->defaults->get("AUDIOASPECT", 0);
> 68 offsets[0] = offsets[1] = offsets[2] = offsets[3] = 0;
> 69
> 70 orig_dimension[0] = dimension[0] = mwindow->session->track_w;
> 71 orig_dimension[1] = dimension[1] = mwindow->session->track_h;
> 72 orig_dimension[2] = dimension[2] = mwindow->session->output_w;
> 73 orig_dimension[3] = dimension[3] = mwindow->session->output_h;
> 74 ratio[0] = ratio[1] = ratio[2] = ratio[3] = 1;
> 75 aspect_w = mwindow->session->aspect_w;
> 76 aspect_h = mwindow->session->aspect_h;
> 77
> 78 window = new ScaleWindow(this);
> 79 window->create_objects();
> 80 int result = window->run_window();
> 81 if(!result)
> 82 {
> 83 int dummy_offsets[4];
> 84 dummy_offsets[0] = dummy_offsets[1] =
> dummy_offsets[2] = dummy_offsets[3] = 0;
> 85 // Fake the offsets if data is scaled.
> 86
> 87 // fix tracks
> 88 //mwindow->stop_playback(1);
> 89 // save the before undo
> 90 mwindow->undo->update_undo_edits(_("Resize"), 0);
> 91 mwindow->tracks->scale_video(dimension, scale_data ?
> dummy_offsets : offsets, scale_data);
> 92 mwindow->session->track_w = dimension[0];
> 93 mwindow->session->track_h = dimension[1];
> 94 mwindow->session->output_w = dimension[2];
> 95 mwindow->session->output_h = dimension[3];
> 96 mwindow->session->aspect_w = aspect_w;
> 97 mwindow->session->aspect_h = aspect_h;
> 98 mwindow->video_window->resize_window();
> 99 mwindow->draw();
> 100 mwindow->undo->update_undo_edits();
> 101 mwindow->session->changes_made = 1;
> 102 mwindow->defaults->update("ASPECTW", aspect_w);
> 103 mwindow->defaults->update("ASPECTH", aspect_h);
> 104 mwindow->defaults->update("AUTOASPECT", auto_aspect);
> 105 }
> 106 delete window;
> 107
> 108 mwindow->defaults->update("SCALECONSTRAIN", constrain_ratio);
> 109 mwindow->defaults->update("SCALEDATA", scale_data);
> 110 already_running = 0;
> 111 }
>
> shouldn't line 67 reads as AUTOASPECT instead of AUDIOASPECT ?
>
> Found this while trying to debug bc2000 crash issue ...
> --
> Cin mailing list
> Cin at lists.cinelerra-gg.org
> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20200312/3c87067f/attachment.html>
More information about the Cin
mailing list