viewer v/b/i/c with shift, titler rgb float fix
authorGood Guy <good1.2guy@gmail.com>
Sat, 10 Mar 2018 00:07:56 +0000 (17:07 -0700)
committerGood Guy <good1.2guy@gmail.com>
Sat, 10 Mar 2018 00:07:56 +0000 (17:07 -0700)
cinelerra-5.1/cinelerra/editpanel.C
cinelerra-5.1/doc/shortcuts.html
cinelerra-5.1/plugins/titler/titler.C

index 8da34dba5046105c9e38f66a459a965d3f43307d..75ee8d4288d67f6cc1cbd50f57938ff59ecf7026 100644 (file)
@@ -835,7 +835,9 @@ int EditOverwrite::handle_event()
 }
 int EditOverwrite::keypress_event()
 {
 }
 int EditOverwrite::keypress_event()
 {
-       if( get_keypress() == 'b' ) {
+       if( alt_down() ) return 0;
+       if( get_keypress() == 'b' ||
+           (panel->is_vwindow() && get_keypress() == 'B') ) {
                handle_event();
                return 1;
        }
                handle_event();
                return 1;
        }
@@ -876,7 +878,9 @@ int EditToClip::handle_event()
 
 int EditToClip::keypress_event()
 {
 
 int EditToClip::keypress_event()
 {
-       if( get_keypress() == 'i' && !alt_down() ) {
+       if( alt_down() ) return 0;
+       if( get_keypress() == 'i' ||
+           (panel->is_vwindow() && get_keypress() == 'I') ) {
                handle_event();
                return 1;
        }
                handle_event();
                return 1;
        }
@@ -928,7 +932,9 @@ int EditSplice::handle_event()
 }
 int EditSplice::keypress_event()
 {
 }
 int EditSplice::keypress_event()
 {
-       if( get_keypress() == 'v' ) {
+       if( alt_down() ) return 0;
+       if( get_keypress() == 'v' ||
+           (panel->is_vwindow() && get_keypress() == 'V') ) {
                handle_event();
                return 1;
        }
                handle_event();
                return 1;
        }
@@ -1035,8 +1041,11 @@ EditCopy::~EditCopy()
 
 int EditCopy::keypress_event()
 {
 
 int EditCopy::keypress_event()
 {
-       if( get_keypress() == 'c' )
+       if( alt_down() ) return 0;
+       if( get_keypress() == 'c' ||
+           (panel->is_vwindow() && get_keypress() == 'C') ) {
                return handle_event();
                return handle_event();
+       }
        return 0;
 }
 int EditCopy::handle_event()
        return 0;
 }
 int EditCopy::handle_event()
index e3b258c94200554d8c60dcd820c0e08677dfc1b5..15a65cc73c94738c8b79fc2f376d815071e6f836 100644 (file)
        <tr>
                <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>To clip</font></td>
        <tr>
                <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>To clip</font></td>
-               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'I'</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'i'</font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Copy selection and create clip</font></td>
        </tr>
        <tr>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Copy selection and create clip</font></td>
        </tr>
        <tr>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'c'</font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Copy selection to cut buffer</font></td>
        </tr>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'c'</font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Copy selection to cut buffer</font></td>
        </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Splice</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'v' + Shift</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Create splice of entire clip</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Overwrite</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'b + Shift'</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Overwrite the entire clip</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>To clip</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'i + Shift</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Copy all and create clip</font></td>
+       </tr>
+       <tr>
+               <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Copy</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>'c' + Shift</font></td>
+               <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Copy entire clip to cut buffer</font></td>
+       </tr>
        <tr>
                <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Show meters</font></td>
        <tr>
                <td height="26" align="left"><font face="Liberation Serif,Times New Roman" size=4><br></font></td>
                <td align="left"><font face="Liberation Serif,Times New Roman" size=4>Show meters</font></td>
index a3f2411bd98594b36bcf5d4ab5061a2a821f0270..117e279e77fd91b394ff71eaf1095fd78b338423 100644 (file)
@@ -2188,7 +2188,7 @@ TitleTranslateUnit::TitleTranslateUnit(TitleMain *plugin, TitleTranslate *server
 
 #define TRANSLATE(type, max, comps, ofs) { \
        type **out_rows = (type**)output->get_rows(); \
 
 #define TRANSLATE(type, max, comps, ofs) { \
        type **out_rows = (type**)output->get_rows(); \
-       float fs = 1./(256.-max); \
+       float fr = 1./(256.-max), fs = max/255.; \
        float r = max > 1 ? 0.5 : 0; \
        for( int y=y1; y<y2; ++y ) { \
                float fy = y+yofs;  int iy = fy; \
        float r = max > 1 ? 0.5 : 0; \
        for( int y=y1; y<y2; ++y ) { \
                float fy = y+yofs;  int iy = fy; \
@@ -2205,8 +2205,8 @@ TitleTranslateUnit::TitleTranslateUnit(TitleMain *plugin, TitleTranslate *server
                        uint8_t *cp10 = in_row1 + i0, *cp11 = in_row1 + i1; \
                        float a00 = yf0 * xf0 * cp00[3], a01 = yf0 * xf1 * cp01[3]; \
                        float a10 = yf1 * xf0 * cp10[3], a11 = yf1 * xf1 * cp11[3]; \
                        uint8_t *cp10 = in_row1 + i0, *cp11 = in_row1 + i1; \
                        float a00 = yf0 * xf0 * cp00[3], a01 = yf0 * xf1 * cp01[3]; \
                        float a10 = yf1 * xf0 * cp10[3], a11 = yf1 * xf1 * cp11[3]; \
-                       float fa = a00 + a01 + a10 + a11;  if( !fa ) continue;  fa *= fs; \
-                       type in_a = fa + r;  float s = 1./fa; \
+                       float fa = a00 + a01 + a10 + a11;  if( !fa ) continue;  \
+                       type in_a = fa*fr + r;  float s = fs/fa; \
                        type in_r = (cp00[0]*a00 + cp01[0]*a01 + cp10[0]*a10 + cp11[0]*a11)*s + r; \
                        type in_g = (cp00[1]*a00 + cp01[1]*a01 + cp10[1]*a10 + cp11[1]*a11)*s + r; \
                        type in_b = (cp00[2]*a00 + cp01[2]*a01 + cp10[2]*a10 + cp11[2]*a11)*s + r; \
                        type in_r = (cp00[0]*a00 + cp01[0]*a01 + cp10[0]*a10 + cp11[0]*a11)*s + r; \
                        type in_g = (cp00[1]*a00 + cp01[1]*a01 + cp10[1]*a10 + cp11[1]*a11)*s + r; \
                        type in_b = (cp00[2]*a00 + cp01[2]*a01 + cp10[2]*a10 + cp11[2]*a11)*s + r; \