[Cin] Is the Waveform properly calibrated ?

Andrew Randrianasulu randrianasulu at gmail.com
Fri Nov 20 19:22:54 CET 2020


В сообщении от Friday 20 November 2020 19:42:52 Pierre autourduglobe via Cin написал(а):
> Thank you for this discovery...
> 
> I had forgotten that discussion I had (5 years ago) with Igor Ubuntu 
> about this subject...
> 
> I am currently re-reading the many texts quoted in this document.
> 
> I had forgotten all this complexity and the multiple distinctions 
> between the IRE values that only concern analog video and the Waveform 
> monitor (VideoScope) of Cinelerra-GG which only calculates % of the 
> digital 0-255 scale.
> 
> It's not easy to understand that a YCbCr source image (16-235) 
> corresponds to 6.3-92% on the Waveform grid, especially since there are 
> no visual cues on the grid to indicate this and to show the video level 
> overruns that could cause problems depending on the destination of the 
> editing ...

I added (by trial and error!) those two lines ... they assume 
WAVEFORM_DIVISIONS 12

but I guess they only valid for some types of footage and some setting of mpeg/jpeg toggle ....


diff --git a/cinelerra-5.1/cinelerra/scopewindow.C b/cinelerra-5.1/cinelerra/scopewindow.C
index 6f34a155..e1cfe335 100644
--- a/cinelerra-5.1/cinelerra/scopewindow.C
+++ b/cinelerra-5.1/cinelerra/scopewindow.C
@@ -754,6 +754,32 @@ void ScopeGUI::draw_overlays(int overlays, int borders, int flush)
                                waveform->draw_line(0, y, wave_w, y);
                                waveform->draw_rectangle(0, 0, wave_w, wave_h);
                        }
+
+                       int y1 = wave_h * 1.8 / WAVEFORM_DIVISIONS;
+                               int text_y1 = y1 + wave_y + get_text_ascent(SMALLFONT) / 2;
+                               CLAMP(text_y1, waveform->get_y() + get_text_ascent(SMALLFONT), waveform->get_y() + waveform->get_h() - 1);
+                       char string1[BCTEXTLEN];
+                       sprintf( string1, "%d",(int)lround((FLOAT_MAX  -
+                                       1.8 * (FLOAT_MAX - FLOAT_MIN ) / WAVEFORM_DIVISIONS ) * 100) );
+                               int text_x1 = wave_x + get_text_width(SMALLFONT, string1) - margin +wave_w;
+                               set_color(text_color);
+                               draw_text(text_x1, text_y1, string1);
+                               CLAMP(y1, 0, waveform->get_h() - 1);
+                               set_color(dark_color);
+                               waveform->draw_line(0, y1, wave_w, y1);
+
+                       int y2 = wave_h * 10.4 / WAVEFORM_DIVISIONS;
+                               int text_y2 = y2 + wave_y + get_text_ascent(SMALLFONT) / 2;
+                               CLAMP(text_y2, waveform->get_y() + get_text_ascent(SMALLFONT), waveform->get_y() + waveform->get_h() - 1);
+                       char string2[BCTEXTLEN];
+                       sprintf( string2, "%d",(int)lround((FLOAT_MAX  -
+                                       10.4 * (FLOAT_MAX - FLOAT_MIN ) / WAVEFORM_DIVISIONS) * 100) );
+                               set_color(text_color);
+                               draw_text(text_x1, text_y2, string2);
+                               CLAMP(y2, 0, waveform->get_h() - 1);
+                               set_color(dark_color);
+                               waveform->draw_line(0, y2, wave_w, y2);
+                       
                        set_line_dashes(0);
                        waveform->draw_point();
                        set_line_dashes(1);


> 
> Pierre
> 
> 
> Le 20-11-19 à 21 h 06, Andrew Randrianasulu a écrit :
> > В сообщении от Friday 20 November 2020 04:31:08 Pierre autourduglobe via Cin написал(а):
> > 
> > And there was thread from 2015 on old Cin mail list discussing very same topic ....
> > 
> > https://lists.cinelerra-cv.org/pipermail/cinelerra/2015q4/003654.html
> > 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cin_two_lines_waveform.png
Type: image/png
Size: 82212 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20201120/126e839e/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scopes_add_two_lines_wave.patch
Type: text/x-diff
Size: 1694 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20201120/126e839e/attachment-0001.bin>


More information about the Cin mailing list