#include "bccmodels.h"
#include "bccolors.h"
#include "clip.h"
+#include "edl.h"
#include "edlsession.h"
#include "filexml.h"
#include "crikey.h"
if( edge_pixel(lofs) ) break;
}
int rofs = ofs;
- for( int i=rt; ++i< w; rt=i,msk[rofs]=0 ) {
+ for( int i=rt; ++i< w; ) {
if( !msk[++rofs] ) break;
msk[rofs] = 0; rt = i;
if( edge_pixel(rofs) ) break;
int CriKey::new_point()
{
- EDLSession *session = get_edlsession();
+ EDLSession *session = get_edl()->session;
float x = !session ? 0.f : session->output_w / 2.f;
float y = !session ? 0.f : session->output_h / 2.f;
return config.add_point(-1, 0, x, y, 0.5f);
}
-static void get_vframe(VFrame *&vfrm, int w, int h, int color_model)
-{
- if( vfrm && ( vfrm->get_w() != w || vfrm->get_h() != h ) ) {
- delete vfrm; vfrm = 0;
- }
- if( !vfrm ) vfrm = new VFrame(w, h, color_model, 0);
-}
-
static void fill_edge(VFrame *vfrm, int w, int h)
{
int w1 = w-1, h1 = h-1;
if( comp > 3 ) comp = 3;
read_frame(src, 0, start_position, frame_rate, 0);
- get_vframe(edg, w, h, BC_A_FLOAT);
+ VFrame::get_temp(edg, w, h, BC_A_FLOAT);
if( !engine )
engine = new CriKeyEngine(this,
PluginClient::get_project_smp() + 1,
PluginClient::get_project_smp() + 1);
- get_vframe(msk, w, h, BC_A8);
+ VFrame::get_temp(msk, w, h, BC_A8);
memset(msk->get_data(), 0xff, msk->get_data_size());
for( int i=0, n=config.points.size(); i<n; ++i ) {
if( !pt->e ) continue;
if( set_target(engine->color, pt->x, pt->y) ) continue;
engine->threshold = pt->t;
- edg->clear_frame();
+ edg->black_frame();
engine->process_packages();
fill_edge(edg, w, h);
FillRegion fill_region(edg, msk);