X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2FC41%2Fc41.C;h=f4f372b187051f0cb9af78a886fffc6ca81373e5;hb=502b6f3b6fd04f6b01c6d70dcb81aa304dd0db1c;hp=b7160b75c79cdd233c25a7c3c2d3956a8e405844;hpb=7b05ad287956f8bd00836d9b5fb39f899a5fb641;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/C41/c41.C b/cinelerra-5.1/plugins/C41/c41.C index b7160b75..f4f372b1 100644 --- a/cinelerra-5.1/plugins/C41/c41.C +++ b/cinelerra-5.1/plugins/C41/c41.C @@ -18,7 +18,7 @@ * */ #include "c41.h" -#include "cicolors.h" +#include "bccolors.h" #include "clip.h" #include "edlsession.h" #include "filexml.h" @@ -214,7 +214,7 @@ int C41Slider::update(int v) return 1; } -const char* C41Effect::plugin_title() { return _("C41"); } +const char* C41Effect::plugin_title() { return N_("C41"); } int C41Effect::is_realtime() { return 1; } int C41Effect::is_synthesis() { return 1; } @@ -430,6 +430,11 @@ C41Effect::C41Effect(PluginServer *server) tmp_frame = 0; blurry_frame = 0; memset(&values, 0, sizeof(values)); + shave_min_row = shave_max_row = 0; + shave_min_col = shave_max_col = 0; + min_col = max_col = 0; + min_row = max_row = 0; + pix_max = 0; pix_len = 0; } C41Effect::~C41Effect() @@ -752,7 +757,7 @@ int C41Effect::process_realtime(VFrame *input, VFrame *output) for( int i = min_row; i < max_row; i++ ) { float *row = (float*)frame->get_rows()[i]; - row += 3 * shave_min_col; + row += 3 * min_col; for( int j = min_col; j < max_col; j++, row += 3 ) { if( row[0] < minima_r ) minima_r = row[0]; if( row[0] > maxima_r ) maxima_r = row[0]; @@ -795,11 +800,11 @@ int C41Effect::process_realtime(VFrame *input, VFrame *output) if( config.show_box ) { EDLSession *session = get_edlsession(); int line_w = bmax(session->output_w,session->output_h) / 600 + 1; - for( int j=0; jget_rows(); if( min_row < max_row - 1 ) { - float *row1 = (float *)rows[min_row+j]; - float *row2 = (float *)rows[max_row-j - 1]; + float *row1 = (float *)rows[min_row+k]; + float *row2 = (float *)rows[max_row-k - 1]; for( int i = 0; i < frame_w; i++ ) { for( int j = 0; j < 3; j++ ) { @@ -816,8 +821,8 @@ int C41Effect::process_realtime(VFrame *input, VFrame *output) } if( min_col < max_col - 1 ) { - int pix1 = pix_len * min_col+j; - int pix2 = pix_len * (max_col-j - 1); + int pix1 = pix_len * (min_col+k); + int pix2 = pix_len * (max_col-k - 1); for( int i = 0; i < frame_h; i++ ) { float *row1 = rows[i] + pix1;