fix mask vframe setup, add unshared vframe constructor
authorGood Guy <good1.2guy@gmail.com>
Sat, 11 Nov 2017 18:30:25 +0000 (11:30 -0700)
committerGood Guy <good1.2guy@gmail.com>
Sat, 11 Nov 2017 18:30:25 +0000 (11:30 -0700)
75 files changed:
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/colorpicker.C
cinelerra-5.1/cinelerra/device1394output.C
cinelerra-5.1/cinelerra/file.C
cinelerra-5.1/cinelerra/filedb.C
cinelerra-5.1/cinelerra/fileexr.C
cinelerra-5.1/cinelerra/filelist.C
cinelerra-5.1/cinelerra/filempeg.C
cinelerra-5.1/cinelerra/fileogg.C
cinelerra-5.1/cinelerra/filepng.C
cinelerra-5.1/cinelerra/filetga.C
cinelerra-5.1/cinelerra/filethread.C
cinelerra-5.1/cinelerra/filetiff.C
cinelerra-5.1/cinelerra/gwindowgui.C
cinelerra-5.1/cinelerra/iec61883output.C
cinelerra-5.1/cinelerra/maskengine.C
cinelerra-5.1/cinelerra/overlayframe.C
cinelerra-5.1/cinelerra/pluginvclient.C
cinelerra-5.1/cinelerra/resourcethread.C
cinelerra-5.1/cinelerra/scenegraph.C
cinelerra-5.1/cinelerra/setformat.C
cinelerra-5.1/cinelerra/theme.C
cinelerra-5.1/cinelerra/vattachmentpoint.C
cinelerra-5.1/cinelerra/vdevice1394.C
cinelerra-5.1/cinelerra/virtualvconsole.C
cinelerra-5.1/cinelerra/vmodule.C
cinelerra-5.1/guicast/bcdragwindow.C
cinelerra-5.1/guicast/vframe.C
cinelerra-5.1/plugins/1080to480/1080to480.C
cinelerra-5.1/plugins/1080to540/1080to540.C
cinelerra-5.1/plugins/720to480/720to480.C
cinelerra-5.1/plugins/crikey/crikey.C
cinelerra-5.1/plugins/decimate/decimate.C
cinelerra-5.1/plugins/deinterlace-cv/deinterlace-cv.C
cinelerra-5.1/plugins/deinterlace/deinterlace.C
cinelerra-5.1/plugins/delayvideo/delayvideo.C
cinelerra-5.1/plugins/denoiseseltempavg/seltempavg.C
cinelerra-5.1/plugins/edge/edge.C
cinelerra-5.1/plugins/fieldframe/fieldframe.C
cinelerra-5.1/plugins/flowobj/flowobj.C
cinelerra-5.1/plugins/framefield/framefield.C
cinelerra-5.1/plugins/freezeframe/freezeframe.C
cinelerra-5.1/plugins/gradient/gradient.C
cinelerra-5.1/plugins/holo/holo.C
cinelerra-5.1/plugins/interpolate/interpolate.C
cinelerra-5.1/plugins/interpolatevideo/interpolatevideo.C
cinelerra-5.1/plugins/ivtc/ivtc.C
cinelerra-5.1/plugins/linearblur/linearblur.C
cinelerra-5.1/plugins/livevideo/livevideo.C
cinelerra-5.1/plugins/motion-cv/motion-cv.C
cinelerra-5.1/plugins/motion-hv/motioncache-hv.C
cinelerra-5.1/plugins/motion-hv/motionscan-hv.C
cinelerra-5.1/plugins/motion/motion.C
cinelerra-5.1/plugins/motion2point/motion.C
cinelerra-5.1/plugins/motion51/motion51.C
cinelerra-5.1/plugins/motionblur/motionblur.C
cinelerra-5.1/plugins/oilpainting/oil.C
cinelerra-5.1/plugins/overlay/overlay.C
cinelerra-5.1/plugins/perspective/perspective.C
cinelerra-5.1/plugins/polar/polar.C
cinelerra-5.1/plugins/radialblur/radialblur.C
cinelerra-5.1/plugins/rgbshift/rgbshift.C
cinelerra-5.1/plugins/scaleratio/scaleratio.C
cinelerra-5.1/plugins/svg/svg.C
cinelerra-5.1/plugins/swapframes/swapframes.C
cinelerra-5.1/plugins/timeavg/timeavg.C
cinelerra-5.1/plugins/timefront/timefront.C
cinelerra-5.1/plugins/titler/titler.C
cinelerra-5.1/plugins/translate/translate.C
cinelerra-5.1/plugins/wave/wave.C
cinelerra-5.1/plugins/whirl/whirl.C
cinelerra-5.1/plugins/yuv411/yuv411.C
cinelerra-5.1/plugins/yuvshift/yuvshift.C
cinelerra-5.1/plugins/zoom/zoom.C
cinelerra-5.1/plugins/zoomblur/zoomblur.C

index 763f62fe3fd85d27a5a9a4c18bafcc69690442f4..d2777c93a74edb902295233ccc6e12da7735ba86 100644 (file)
@@ -106,7 +106,7 @@ VFrame *AssetVIcon::frame()
                        delete temp;  temp = 0;
                }
                if( !temp )
-                       temp = new VFrame(asset->width, asset->height, BC_RGB888);
+                       temp = new VFrame(asset->width, asset->height, BC_RGB888, 0);
                int ww = picon->gui->vicon_thread->view_w;
                int hh = picon->gui->vicon_thread->view_h;
                while( seq_no >= images.size() ) {
index a99896dd3325275828dba84113e64cb29364fe0a..b9db0c76e96a8d4fed7c8ab129e6829b82bbd9ec 100644 (file)
@@ -578,7 +578,7 @@ PaletteWheelValue::~PaletteWheelValue()
 
 void PaletteWheelValue::create_objects()
 {
-       frame = new VFrame(0, -1, get_w(), get_h(), BC_RGB888, -1);
+       frame = new VFrame(get_w(), get_h(), BC_RGB888);
        draw(window->hsv.h, window->hsv.s, window->hsv.v);
        flash();
 }
index 6aa493e20dd376a143feb26cc29e41f8d626b7be..7cda574b1119f0d6661bd3ffd274f1c4826bc20a 100644 (file)
@@ -644,13 +644,7 @@ void Device1394Output::write_frame(VFrame *input)
                                int h = input->get_h();
 // Default to NTSC if unknown
                                if(h != 480 && h != 576) h = 480;
-
-                               temp_frame2 = new VFrame(0,
-                                       -1,
-                                       720,
-                                       h,
-                                       BC_YUV422,
-                                       -1);
+                               temp_frame2 = new VFrame(720, h, BC_YUV422, 0);
 
                        }
 
index 4b9c1be85a5ccc60c4544442de152593834e2b7b..bd1a0c6db5057c45e688b9207407a0394cc85ac1 100644 (file)
@@ -1146,7 +1146,7 @@ int File::read_frame(VFrame *frame, int is_thread)
                }
 
                if( !temp_frame ) {
-                       temp_frame = new VFrame(asset->width, asset->height, supported_colormodel);
+                       temp_frame = new VFrame(asset->width, asset->height, supported_colormodel, 0);
                }
 
 //                     printf("File::read_frame %d\n", __LINE__);
index e8e683dd79bfb9b783d67c64c50b47c8a1fbd400..301dcb611ce7bcdb8620a4cc18c996e2e4a9aed5 100644 (file)
@@ -157,7 +157,7 @@ int FileDB::read_frame(VFrame *frame)
        }
        VFrame *fp = frame->get_w() == swidth && frame->get_h() == sheight &&
                        frame->get_color_model() == BC_YUV420P ? frame :
-               !vframe ? (vframe = new VFrame(swidth,sheight,BC_YUV420P)) :
+               !vframe ? (vframe = new VFrame(swidth,sheight,BC_YUV420P,0)) :
                vframe;
        if( !result ) {
                if( frame_id < 0 )
index ca0c879f91b332603b4a91faea18594281a500da..33b1bdd2a9b11f16463deea64c6fa6b65c3e382b 100644 (file)
@@ -468,12 +468,8 @@ int FileEXR::write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit)
 
        if(frame->get_color_model() != native_cmodel)
        {
-               if(!exr_unit->temp_frame) exr_unit->temp_frame = new VFrame(0,
-                       -1,
-                       asset->width,
-                       asset->height,
-                       native_cmodel,
-                       -1);
+               if(!exr_unit->temp_frame) exr_unit->temp_frame =
+                       new VFrame(asset->width, asset->height, native_cmodel, 0);
                BC_CModels::transfer(exr_unit->temp_frame->get_rows(), /* Leave NULL if non existent */
                        frame->get_rows(),
                        exr_unit->temp_frame->get_y(), /* Leave NULL if non existent */
index 4614f3f831f40cf9e842f3be3dafd65b629448c5..f44d11a8711f196a4eb554b60f6262e99167bacb 100644 (file)
@@ -368,12 +368,8 @@ int FileList::read_frame(VFrame *frame)
                                                        data->allocate_compressed_data(ostat.st_size);
                                                        data->set_compressed_size(ostat.st_size);
                                                        (void)fread(data->get_data(), ostat.st_size, 1, fd);
-                                                       temp = new VFrame(0,
-                                                               -1,
-                                                               asset->width,
-                                                               asset->height,
-                                                               frame->get_color_model(),
-                                                               -1);
+                                                       temp = new VFrame(asset->width, asset->height,
+                                                                       frame->get_color_model(), 0);
                                                        read_frame(temp, data);
                                                        break;
                                        }
@@ -388,12 +384,7 @@ int FileList::read_frame(VFrame *frame)
                        }
                        else
                        {
-                               temp = new VFrame(0,
-                                       -1,
-                                       asset->width,
-                                       asset->height,
-                                       frame->get_color_model(),
-                                       -1);
+                               temp = new VFrame(asset->width, asset->height, frame->get_color_model(), 0);
                                read_frame(temp, asset->path);
                        }
                }
index 8310942cb6ac158375c3a46d87193421277b343b..4617fe3f5b6f160e69d38072c48037feb2f5e5ba 100644 (file)
@@ -1325,12 +1325,8 @@ int FileMPEG::write_frames(VFrame ***frames, int len)
 
                                                if(!temp_frame)
                                                {
-                                                       temp_frame = new VFrame(0,
-                                                               -1,
-                                                               temp_w,
-                                                               temp_h,
-                                                               output_cmodel,
-                                                               -1);
+                                                       temp_frame = new VFrame(temp_w, temp_h,
+                                                                       output_cmodel, 0);
                                                }
 
                                                BC_CModels::transfer(temp_frame->get_rows(),
@@ -1376,12 +1372,8 @@ int FileMPEG::write_frames(VFrame ***frames, int len)
 //printf("FileMPEG::write_frames %d\n", __LINE__);sleep(1);
                                                if(!temp_frame)
                                                {
-                                                       temp_frame = new VFrame(0,
-                                                               -1,
-                                                               asset->width,
-                                                               asset->height,
-                                                               output_cmodel,
-                                                               -1);
+                                                       temp_frame = new VFrame(asset->width, asset->height,
+                                                                               output_cmodel, 0);
                                                }
 
 // printf("FileMPEG::write_frames %d temp_frame=%p %p %p %p frame=%p %p %p %p color_model=%p %p\n",
index 0c718fba26d979b739f5947738a4716ca4fe153c..a7612a4f1fd6ceb428b663e5960e02c787ef00d5 100644 (file)
@@ -1501,15 +1501,9 @@ int FileOGG::read_frame(VFrame *frame)
                yuv.v += yuv.uv_stride * (yuv.uv_height - 1);
                yuv.y_stride = - yuv.y_stride;
                yuv.uv_stride = - yuv.uv_stride;*/
-               VFrame *temp_frame = new VFrame(yuv.y,
-                                               -1,
-                                               0,
-                                               yuv.u - yuv.y,
-                                               yuv.v - yuv.y,
-                                               - yuv.y_stride,
-                                               yuv.y_height,
-                                               BC_YUV420P,
-                                               - yuv.y_stride);
+               VFrame *temp_frame = new VFrame(yuv.y, -1, 0,
+                                       yuv.u - yuv.y, yuv.v - yuv.y, - yuv.y_stride,
+                                       yuv.y_height, BC_YUV420P, - yuv.y_stride);
                // copy into temp frame...
 
                BC_CModels::transfer(frame->get_rows(),
@@ -1959,12 +1953,7 @@ int FileOGG::write_frames_theora(VFrame ***frames, int len, int e_o_s)
 
                if (!temp_frame)
                {
-                       temp_frame = new VFrame (0,
-                                               -1,
-                                               tf->ti.width,
-                                               tf->ti.height,
-                                               BC_YUV420P,
-                                               -1);
+                       temp_frame = new VFrame ( tf->ti.width, tf->ti.height, BC_YUV420P, 0);
                }
                VFrame *frame = frames[0][j];
                int in_color_model = frame->get_color_model();
index 0cb6445bec64c6c0f7ffd186085925735499313c..d6fd37966e7751d95d714eeb3e0982ff21a458c6 100644 (file)
@@ -216,8 +216,8 @@ int FilePNG::write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit)
        native_cmodel = asset->png_use_alpha ? BC_RGBA8888 : BC_RGB888;
        if(frame->get_color_model() != native_cmodel)
        {
-               if(!png_unit->temp_frame) png_unit->temp_frame = new VFrame(0,
-                       -1, asset->width, asset->height, native_cmodel, -1);
+               if(!png_unit->temp_frame) png_unit->temp_frame =
+                       new VFrame(asset->width, asset->height, native_cmodel, 0);
 
                png_unit->temp_frame->transfer_from(frame);
                output_frame = png_unit->temp_frame;
index 0ec8a73b9b6f83e6ee9e475404e54ac6990e1a70..e970c1c8f2b8e6ac6be8a5e9214a74044117cfe2 100644 (file)
@@ -357,7 +357,7 @@ void FileTGA::read_tga(Asset *asset, VFrame *frame, VFrame *data, VFrame* &temp)
 
                if(!temp)
                {
-                       temp = new VFrame(0, -1, width, height, source_cmodel, -1);
+                       temp = new VFrame(width, height, source_cmodel, 0);
                }
                output_frame = temp;
        }
index c5b28785c03cd7f491adb61c1f5fb59d56a58b52..338176e6d86932116178431fe3aab071863fb528 100644 (file)
@@ -214,12 +214,9 @@ void FileThread::run()
 //printf("FileThread::run %d\n", __LINE__);
                                if(!local_frame->frame)
                                {
-                                       local_frame->frame = new VFrame(0,
-                                               -1,
-                                               file->asset->width,
-                                               file->asset->height,
-                                               supported_colormodel,
-                                               -1);
+                                       local_frame->frame =
+                                               new VFrame(file->asset->width, file->asset->height,
+                                                       supported_colormodel, 0);
                                }
 
 // Read it
@@ -454,12 +451,8 @@ int FileThread::start_writing(long buffer_size,
                                        else
                                        {
                                                video_buffer[buffer][layer][frame] =
-                                                       new VFrame(0,
-                                                               -1,
-                                                               file->asset->width,
-                                                               file->asset->height,
-                                                               color_model,
-                                                               -1);
+                                                       new VFrame( file->asset->width, file->asset->height,
+                                                               color_model, -1);
 // printf("FileThread::start_writing %d %d %d %d %p\n",
 // __LINE__,
 // buffer,
index b7891ac7ad1f5ec1a757774938376f3160600e9b..994fd6d0a8e7b995af97532a8ecc53b4a4620a43 100644 (file)
@@ -512,12 +512,8 @@ int FileTIFF::write_frame(VFrame *frame, VFrame *data, FrameWriterUnit *unit)
                }
                if(!tiff_unit->temp)
                {
-                       tiff_unit->temp = new VFrame(0,
-                               -1,
-                               asset->width,
-                               asset->height,
-                               color_model,
-                               -1);
+                       tiff_unit->temp =
+                               new VFrame(asset->width, asset->height, color_model, 0);
                }
 
                BC_CModels::transfer(tiff_unit->temp->get_rows(),
index b18920349d34ccb8516030ba3e63209a995c9a4c..aaea761e5457cf82678b0efa29dd219875ac4218 100644 (file)
@@ -191,7 +191,7 @@ GWindowColorButton::GWindowColorButton(GWindowToggle *auto_toggle, int x, int y,
        this->auto_toggle = auto_toggle;
        this->color = 0;
        for( int i=0; i<3; ++i ) {
-               vframes[i] = new VFrame(w, w, BC_RGBA8888, -1);
+               vframes[i] = new VFrame(w, w, BC_RGBA8888);
                vframes[i]->clear_frame();
        }
 }
index 8997266f1dd75cfa43ec9d20a09479767e0f3582..9a54a1154bfd63ddaefda22b9f21648f5a88c0c8 100644 (file)
@@ -370,14 +370,7 @@ void IEC61883Output::write_frame(VFrame *input)
                                int h = input->get_h();
 // Default to NTSC if unknown
                                if(h != 480 && h != 576) h = 480;
-
-                               temp_frame2 = new VFrame(0,
-                                       -1,
-                                       720,
-                                       h,
-                                       BC_YUV422,
-                                       -1);
-
+                               temp_frame2 = new VFrame(720, h, BC_YUV422, 0);
                        }
 
                        int norm = is_pal ? DV_PAL : DV_NTSC;
index 7f7917661e9194ae0094bac728be432f2f0ccf3a..ed7cbaaebdbddfafcf72709f205eb891f5542e42 100644 (file)
@@ -370,22 +370,14 @@ SET_TRACE
 SET_TRACE
                if(temp &&
                        (temp->get_w() != oversampled_package_w ||
-                       temp->get_h() != oversampled_package_h))
-               {
-                       delete temp;
-                       temp = 0;
+                       temp->get_h() != oversampled_package_h)) {
+                       delete temp;  temp = 0;
                }
 //printf("MaskUnit::process_package 1\n");
 
 SET_TRACE
-               if(!temp)
-               {
-                       temp = new VFrame(0,
-                               -1,
-                               oversampled_package_w,
-                               oversampled_package_h,
-                               BC_A8,
-                               -1);
+               if(!temp) {
+                       temp = new VFrame(oversampled_package_w, oversampled_package_h, BC_A8, 0);
                }
 
 SET_TRACE
@@ -868,18 +860,10 @@ SET_TRACE
                recalculate = 1;
                if(!mask)
                {
-                       mask = new VFrame(0,
-                                       -1,
-                                       output->get_w(),
-                                       output->get_h(),
-                                       new_color_model,
-                                       -1);
-                       temp_mask = new VFrame(0,
-                                       -1,
-                                       output->get_w(),
-                                       output->get_h(),
-                                       new_color_model,
-                                       -1);
+                       mask = new VFrame(output->get_w(), output->get_h(),
+                                       new_color_model, 0);
+                       temp_mask = new VFrame(output->get_w(), output->get_h(),
+                                       new_color_model, 0);
                }
                if(new_feather > 0)
                        temp_mask->clear_frame();
@@ -934,19 +918,15 @@ void MaskEngine::init_packages()
 {
 SET_TRACE
 //printf("MaskEngine::init_packages 1\n");
-       int division = (int)((float)output->get_h() / (get_total_packages() / 2) + 0.5);
-       if(division < 1) division = 1;
-
+       int x0 = 0, y0 = 0, i = 0, n = get_total_packages();
+       int out_w = output->get_w(), out_h = output->get_h();
 SET_TRACE
-       for(int i = 0; i < get_total_packages(); i++)
-       {
-               MaskPackage *ptr = (MaskPackage*)get_package(i);
-
-               ptr->start_y = output->get_h() * i / get_total_packages();
-               ptr->end_y = output->get_h() * (i + 1) / get_total_packages();
-
-               ptr->start_x = output->get_w() * i / get_total_packages();
-               ptr->end_x = output->get_w() * (i + 1) / get_total_packages();
+       while( i < n ) {
+               MaskPackage *ptr = (MaskPackage*)get_package(i++);
+               int x1 = (out_w * i) / n, y1 = (out_h * i) / n;
+               ptr->start_x = x0;  ptr->end_x = x1;
+               ptr->start_y = y0;  ptr->end_y = y1;
+               x0 = x1;  y0 = y1;
        }
 SET_TRACE
 //printf("MaskEngine::init_packages 2\n");
index d637827dfd52ea762f265ea07a08bbcfb699f562..c8690339a4b62c3a250079106467e5eee64ebd50 100644 (file)
@@ -313,8 +313,8 @@ int OverlayFrame::overlay(VFrame *output, VFrame *input,
                }
 
                if(!temp_frame) {
-                       temp_frame = new VFrame(0, -1, temp_w, temp_h,
-                               input->get_color_model(), -1);
+                       temp_frame =
+                               new VFrame(temp_w, temp_h, input->get_color_model(), 0);
                }
 
                temp_frame->clear_frame();
index 02de13922cb5a6e2a186b63c081655934426f813..4ce953f7d7c3fe1ef5c75be651b555710ce94fa8 100644 (file)
@@ -71,7 +71,7 @@ VFrame* PluginVClient::new_temp(int w, int h, int color_model)
 
        if(!temp)
        {
-               temp = new VFrame(0, -1, w, h, color_model, -1);
+               temp = new VFrame(w, h, color_model, 0);
        }
 
        return temp;
index 430678cc578c67b3c90527cb68f9822a5da92300..62aee466094c33fdc751cc803bdcc969b5cd8d78 100644 (file)
@@ -452,12 +452,7 @@ void ResourceThread::do_video(VResourceThreadItem *item)
 
        if(!temp_picon)
        {
-               temp_picon = new VFrame(0,
-                       -1,
-                       source_w,
-                       source_h,
-                       source_cmodel,
-                       -1);
+               temp_picon = new VFrame(source_w, source_h, source_cmodel, 0);
        }
 
 // Get temporary to copy cached frame to
@@ -471,12 +466,7 @@ void ResourceThread::do_video(VResourceThreadItem *item)
 
        if(!temp_picon2)
        {
-               temp_picon2 = new VFrame(0,
-                       -1,
-                       item->picon_w,
-                       item->picon_h,
-                       BC_RGB888,
-                       -1);
+               temp_picon2 = new VFrame( item->picon_w, item->picon_h, BC_RGB888, 0);
        }
 
 
@@ -489,17 +479,12 @@ void ResourceThread::do_video(VResourceThreadItem *item)
        Asset *asset = 0;
 
        picon_frame = mwindow->frame_cache->get_frame_ptr(item->position,
-               item->layer,
-               item->frame_rate,
-               BC_RGB888,
-               item->picon_w,
-               item->picon_h,
-               source_id);
+               item->layer, item->frame_rate, BC_RGB888,
+               item->picon_w, item->picon_h, source_id);
 //printf("search cache %ld,%d,%f,%dx%d,%d = %p\n",
 //  item->position, item->layer, item->frame_rate,
 //  item->picon_w, item->picon_h, source_id, picon_frame);
-       if( picon_frame )
-       {
+       if( picon_frame ) {
                temp_picon2->copy_from(picon_frame);
 // Unlock the get_frame_ptr command
                mwindow->frame_cache->unlock();
@@ -542,48 +527,22 @@ void ResourceThread::do_video(VResourceThreadItem *item)
 
        if(need_conversion)
        {
-               picon_frame = new VFrame(0,
-                       -1,
-                       item->picon_w,
-                       item->picon_h,
-                       BC_RGB888,
-                       -1);
-               BC_CModels::transfer(picon_frame->get_rows(),
-                       temp_picon->get_rows(),
-                       0,
-                       0,
-                       0,
-                       0,
-                       0,
-                       0,
-                       0,
-                       0,
-                       temp_picon->get_w(),
-                       temp_picon->get_h(),
-                       0,
-                       0,
-                       picon_frame->get_w(),
-                       picon_frame->get_h(),
-                       source_cmodel,
-                       BC_RGB888,
-                       0,
+               picon_frame = new VFrame(item->picon_w, item->picon_h, BC_RGB888, 0);
+               BC_CModels::transfer(picon_frame->get_rows(), temp_picon->get_rows(),
+                       0, 0, 0,  0, 0, 0,
+                       0, 0, temp_picon->get_w(), temp_picon->get_h(),
+                       0, 0, picon_frame->get_w(), picon_frame->get_h(),
+                       source_cmodel, BC_RGB888, 0,
                        temp_picon->get_bytes_per_line(),
                        picon_frame->get_bytes_per_line());
                temp_picon2->copy_from(picon_frame);
-               mwindow->frame_cache->put_frame(picon_frame,
-                       item->position,
-                       item->layer,
-                       mwindow->edl->session->frame_rate,
-                       0,
-                       item->indexable);
+               mwindow->frame_cache->put_frame(picon_frame, item->position, item->layer,
+                       mwindow->edl->session->frame_rate, 0, item->indexable);
        }
 
 // Allow escape here
        if(interrupted)
-       {
                return;
-       }
-
 
 // Draw the picon
        mwindow->gui->lock_window("ResourceThread::do_video");
index a8098e12ef766a7e6a135eef021b4e027261efd9..70513d88d854f07590dc584ab43bebbfcff110b7 100644 (file)
@@ -146,9 +146,7 @@ void SceneNode::render(VFrame *frame, int do_camera)
 // Render everything into a temporary, then overlay the temporary
 //             if(!EQUIV(ry, 0) || get_flip())
 //             {
-               temp = new VFrame(image->get_w(),
-                       image->get_h(),
-                       image->get_color_model());
+               temp = new VFrame(image->get_w(), image->get_h(), image->get_color_model(), 0);
 //             }
                if(debug) printf("SceneNode::render %d\n", __LINE__);
 
@@ -169,14 +167,9 @@ void SceneNode::render(VFrame *frame, int do_camera)
                VFrame *src = temp;
                if(!EQUIV(ry, 0))
                {
-                       src = temp2 = new VFrame(image->get_w(),
-                               image->get_h(),
-                               image->get_color_model());
-                       if(!scene->affine) scene->affine =
-                               new AffineEngine(scene->cpus, scene->cpus);
-                       scene->affine->rotate(temp2,
-                               temp,
-                               ry);
+                       src = temp2 = new VFrame(image->get_w(), image->get_h(), image->get_color_model(), 0);
+                       if(!scene->affine) scene->affine = new AffineEngine(scene->cpus, scene->cpus);
+                       scene->affine->rotate(temp2, temp, ry);
                        if(debug) printf("SceneNode::render %d ry=%f\n", __LINE__, ry);
                }
 
@@ -185,13 +178,7 @@ void SceneNode::render(VFrame *frame, int do_camera)
                        src->flip_horiz();
 
                if(debug) printf("SceneNode::render %d src=%p x=%f y=%f sx=%f sy=%f\n",
-                       __LINE__,
-                       src,
-                       x,
-                       y,
-                       sx,
-                       sy);
-
+                       __LINE__, src, x, y, sx, sy); 
 // Overlay on the output frame
                if(!scene->overlayer) scene->overlayer = new OverlayFrame(scene->cpus);
 
index af83439737b53a6985e93026b4a72f5b3395f297..1ca51112e3f86cadeffd185c6c2638f43fcca7de 100644 (file)
@@ -621,12 +621,11 @@ SetChannelsCanvas::SetChannelsCanvas(MWindow *mwindow,
        this->mwindow = mwindow;
        active_channel = -1;
        box_r = mwindow->theme->channel_position_data->get_w() / 2;
-       temp_picon = new VFrame(0,
-               -1,
+       temp_picon = new VFrame(
                mwindow->theme->channel_position_data->get_w(),
                mwindow->theme->channel_position_data->get_h(),
                mwindow->theme->channel_position_data->get_color_model(),
-               -1);
+               0);
        rotater = new RotateFrame(mwindow->preferences->processors,
                mwindow->theme->channel_position_data->get_w(),
                mwindow->theme->channel_position_data->get_h());
index be8aac82829d1d22aa53f733df739b5255774893..a04d01fef4d68da521cda261ff6478f7034b5f8d 100644 (file)
@@ -57,7 +57,7 @@
 #include <string.h>
 
 #define NEW_VFRAME \
-new VFrame(0, -1, default_data.get_w(), default_data.get_h(), BC_RGBA8888, -1)
+new VFrame(default_data.get_w(), default_data.get_h(), BC_RGBA8888)
 
 Theme::Theme()
  : BC_Theme()
index 0a04d1179dd3265fe730cb79207b9d3490ed9378..9ee8fe35b814b4873dc1dee5368b210d9a26b753 100644 (file)
@@ -74,12 +74,7 @@ void VAttachmentPoint::new_buffer_vector(int width, int height, int colormodel)
                buffer_vector = new VFrame*[virtual_plugins.total];
                for(int i = 0; i < virtual_plugins.total; i++)
                {
-                       buffer_vector[i] = new VFrame(0,
-                               -1,
-                               width,
-                               height,
-                               colormodel,
-                               -1);
+                       buffer_vector[i] = new VFrame(width, height, colormodel);
                }
        }
 }
index 8f3872e71d02421198ec019b778abcb0ea11bd12..839e64eb5dca0fbd352208b11d7b647555d983c9 100644 (file)
@@ -254,12 +254,7 @@ void VDevice1394::new_output_buffer(VFrame **output,
                                user_frame = new VFrame;
                                break;
                        default:
-                               user_frame = new VFrame(0,
-                                       -1,
-                                       device->out_w,
-                                       device->out_h,
-                                       colormodel,
-                                       -1);
+                               user_frame = new VFrame(device->out_w, device->out_h, colormodel);
                                break;
                }
        }
index 094400e03c07da96800cf0c8f3fdea81ec6605ad..14488944edb40971744600ea859d701a9e2c34fb 100644 (file)
@@ -156,12 +156,8 @@ int VirtualVConsole::process_buffer(int64_t input_position,
                if(!output_temp)
                {
 // Texture is created on demand
-                       output_temp = new VFrame(0,
-                               -1,
-                               track->track_w,
-                               track->track_h,
-                               renderengine->get_edl()->session->color_model,
-                               -1);
+                       output_temp = new VFrame( track->track_w, track->track_h,
+                               renderengine->get_edl()->session->color_model);
                }
 
 // Reset OpenGL state
index 28f5a6d323db3e20d94acd23129b6b54dcff1a80..5019c86bd62769d96f65b4c6eae1134261d461d2 100644 (file)
@@ -478,12 +478,9 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit,
 
                                if(!(*input))
                                {
-                                       (*input) = new VFrame(0,
-                                               -1,
-                                               asset_w,
-                                               asset_h,
-                                               get_edl()->session->color_model,
-                                               -1);
+                                       (*input) =
+                                               new VFrame(asset_w, asset_h,
+                                                       get_edl()->session->color_model);
                                }
 
 
@@ -989,12 +986,9 @@ int VModule::render(VFrame *output,
 // Load incoming frame
                if(!(*transition_input))
                {
-                       (*transition_input) = new VFrame(0,
-                               -1,
-                               track->track_w,
-                               track->track_h,
-                               get_edl()->session->color_model,
-                               -1);
+                       (*transition_input) =
+                               new VFrame(track->track_w, track->track_h,
+                                       get_edl()->session->color_model);
                }
 
                (*transition_input)->copy_stacks(output);
index 82ac5762d588c9de97dd89534d9f7a150d5f4c49..54814a29f55b20ee08e897d2212d07b789d656d3 100644 (file)
@@ -109,7 +109,7 @@ BC_Pixmap *BC_DragWindow::prepare_frame(VFrame *frame, BC_WindowBase *parent_win
        int tw = frame->get_w(), th = frame->get_h();
 
        if( frame->get_color_model() != BC_RGBA8888 ) {
-               temp_frame = new VFrame(tw, th, BC_RGBA8888);
+               temp_frame = new VFrame(tw, th, BC_RGBA8888, 0);
                temp_frame->transfer_from(frame);
        }
 
index d05ff849307050228459fa93e2767774286b14f9..1cfeb58b8c988b8daae95244f259f09618dd6088 100644 (file)
@@ -139,6 +139,8 @@ VFrame::VFrame(VFrame &frame)
 VFrame::VFrame(int w, int h, int color_model, long bytes_per_line)
 {
        reset_parameters(1);
+//  use bytes_per_line == 0 to allocate default unshared
+       if( !bytes_per_line ) { bytes_per_line = -1;  use_shm = 0; }
        params = new BC_Hash;
        allocate_data(data, -1, 0, 0, 0, w, h,
                color_model, bytes_per_line);
@@ -836,7 +838,7 @@ int VFrame::write_png(const char *path)
                        bc_cmodel = BC_RGBA8888;
                        png_cmodel = PNG_COLOR_TYPE_RGB_ALPHA;
                }
-               vframe = new VFrame(get_w(), get_h(), bc_cmodel, -1);
+               vframe = new VFrame(get_w(), get_h(), bc_cmodel, 0);
                vframe->transfer_from(this);
                break;
        }
index fc18c5b1f918f52114c0cc96671c45083e2fccfd..24bfa698b9643a44b94e182b3da755d17b09daa7 100644 (file)
@@ -237,7 +237,7 @@ int _1080to480Main::process_realtime(VFrame *input, VFrame *output)
        load_configuration();
        if(!temp)
        {
-               temp = new VFrame(input->get_w(), input->get_h(), input->get_color_model());
+               temp = new VFrame(input->get_w(), input->get_h(), input->get_color_model(), 0);
                temp->clear_frame();
        }
 
index 21306b55d40bc7bf014d61d61a7e4068883642aa..8e44c87cc44ce5d6bc648731b03994e85b6ad98b 100644 (file)
@@ -241,12 +241,8 @@ int _1080to540Main::process_realtime(VFrame *input, VFrame *output)
        load_configuration();
        if(!temp)
        {
-               temp = new VFrame(0,
-                       -1,
-                       input->get_w(),
-                       input->get_h(),
-                       input->get_color_model(),
-                       -1);
+               temp = new VFrame(input->get_w(), input->get_h(),
+                       input->get_color_model(), 0);
                temp->clear_frame();
        }
 
index fcc1a47d6d6a485876382d711bcadb043316189c..e0b5d2161e6c159e512b17bcee57a4298508d6d8 100644 (file)
@@ -330,12 +330,8 @@ int _720to480Main::process_loop(VFrame *output)
        int result = 0;
 
        if(!temp)
-               temp = new VFrame(0,
-                       -1,
-                       output->get_w(),
-                       output->get_h(),
-                       output->get_color_model(),
-                       -1);
+               temp = new VFrame(output->get_w(), output->get_h(),
+                               output->get_color_model(), 0);
 
        if(config.direction == FORWARD)
        {
index b3e7592bddcd655eaa5494cbf4697b01ebea9041..17373ef5eca26e49b44fc2b36e78d0bff1a99a9f 100644 (file)
@@ -558,7 +558,7 @@ int CriKey::process_buffer(VFrame *frame, int64_t start_position, double frame_r
                delete dst;  dst = 0;
         }
         if( !dst )
-               dst = new VFrame(w, h, BC_A8);
+               dst = new VFrame(w, h, BC_A8, 0);
        dst->clear_frame();
 
        if( !engine )
@@ -578,7 +578,7 @@ int CriKey::process_buffer(VFrame *frame, int64_t start_position, double frame_r
                        delete msk;  msk = 0;
                }
                if( !msk )
-                       msk = new VFrame(w, h, BC_A8);
+                       msk = new VFrame(w, h, BC_A8, 0);
                memset(msk->get_data(), 0xff, msk->get_data_size());
 
                FillRegion fill_region(dst, msk);
index e7d0d6d3c5f4395e26f4a5b53d29665c99e7884c..f2d4d6bb35d6a74ad73cc1c2a9143b56aa709254 100644 (file)
@@ -708,14 +708,9 @@ int Decimate::process_buffer(VFrame *frame,
 
        if(!frames[0])
        {
-               for(int i = 0; i < TOTAL_FRAMES; i++)
-               {
-                       frames[i] = new VFrame(0,
-                               -1,
-                               frame->get_w(),
-                               frame->get_h(),
-                               frame->get_color_model(),
-                               -1);
+               for(int i = 0; i < TOTAL_FRAMES; i++) {
+                       frames[i] = new VFrame(frame->get_w(), frame->get_h(),
+                                       frame->get_color_model(), 0);
                }
        }
 
index db378044d96efd7b837c4c20827db3f6b417cb65..b7cc0dc12e298a2e54d92a252fa31660b4fcd364 100644 (file)
@@ -537,15 +537,11 @@ int DeInterlaceMain::process_buffer(VFrame *frame,
        temp = frame;
 
 //     if(!temp)
-//             temp = new VFrame(
-//                     frame->get_w(),
-//                     frame->get_h(),
-//                     frame->get_color_model());
+//             temp = new VFrame(frame->get_w(), frame->get_h(),
+//                     frame->get_color_model(), 0);
        if(!temp_prevframe)
-               temp_prevframe = new VFrame(
-                       frame->get_w(),
-                       frame->get_h(),
-                       frame->get_color_model());
+               temp_prevframe = new VFrame(frame->get_w(), frame->get_h(),
+                       frame->get_color_model(), 0);
 
        switch(config.mode)
        {
index 7d1d41d79fa34ad144012b9f38404d8d738a18bc..850959e3183130dbceebe77105f84f99d4dfe8f5 100644 (file)
@@ -378,10 +378,8 @@ int DeInterlaceMain::process_buffer(VFrame *frame,
        temp = frame;
 
 //     if(!temp)
-//             temp = new VFrame(0,
-//                     frame->get_w(),
-//                     frame->get_h(),
-//                     frame->get_color_model());
+//             temp = new VFrame(frame->get_w(), frame->get_h(),
+//                     frame->get_color_model(), 0);
 
        switch(config.mode)
        {
index a3f7db6b8c0c7526e017b7e80bd62a48066da1ea..55ea5d4e0915a7aadbab2a1129bbd7290d6ca062 100644 (file)
@@ -195,12 +195,8 @@ void DelayVideo::reconfigure()
 
        for(int i = reuse; i < new_allocation; i++)
        {
-               new_buffer[i] = new VFrame(0,
-                       -1,
-                       input->get_w(),
-                       input->get_h(),
-                       PluginVClient::project_color_model,
-                       -1);
+               new_buffer[i] = new VFrame(input->get_w(), input->get_h(),
+                       PluginVClient::project_color_model, 0);
        }
 
        for(int i = reuse; i < allocation; i++)
index 23fdf915ce991c7f1e3f4314fdde5d7fb44cad11..b573898117088c72b4468628442f3a3be60aee93 100644 (file)
@@ -184,7 +184,7 @@ int SelTempAvgMain::process_buffer(VFrame *frame,
 // Create new frames
                                for( ; i < config.frames; i++)
                                {
-                                       history2[i] = new VFrame(w, h, color_model);
+                                       history2[i] = new VFrame(w, h, color_model, 0);
                                        history_frame2[i] = -0x7fffffff;
                                        history_valid2[i] = 0;
                                }
@@ -201,7 +201,7 @@ int SelTempAvgMain::process_buffer(VFrame *frame,
                {
                        history = new VFrame*[config.frames];
                        for(int i = 0; i < config.frames; i++)
-                               history[i] = new VFrame(w, h, color_model);
+                               history[i] = new VFrame(w, h, color_model, 0);
                        history_size = config.frames;
                        history_frame = new int64_t[config.frames];
                        bzero(history_frame, sizeof(int64_t) * config.frames);
index b0c14ea9cea1b12d73192cbbc88de11213d15f15..b8541927ee10399efa1fac46218ec1efd429fbd6 100644 (file)
@@ -135,7 +135,7 @@ int Edge::process_buffer(VFrame *frame, int64_t start_position, double frame_rat
                delete dst;  dst = 0;
        }
        if( !dst )
-               dst = new VFrame(0, -1, w, h, color_model, -1);
+               dst = new VFrame(w, h, color_model, 0);
 
        if( !engine )
                engine = new EdgeEngine(this,
index f2e17a15b600720e6da296157f3d969755b4f40a..0a39eb1b0dc1e8ed710b1ed30f3c582e42139dce 100644 (file)
@@ -416,12 +416,8 @@ int FieldFrame::process_buffer(VFrame *frame,
 
        if(!input)
        {
-               input = new VFrame(0,
-                       -1,
-                       frame->get_w(),
-                       frame->get_h(),
-                       frame->get_color_model(),
-                       -1);
+               input = new VFrame(frame->get_w(), frame->get_h(),
+                               frame->get_color_model(), 0);
        }
 
 // Get input frames
index 32d3760da0d693c4265b8e63cc0345f7c75ac179..9ebeb4f9d22d19edce6e4ff83f4ef19a04d8b9d8 100644 (file)
@@ -301,7 +301,7 @@ int FlowObj::process_buffer(VFrame *frame, int64_t start_position, double frame_
                        delete accum;  accum = 0;
                }
                if( !accum ) {
-                       accum = new VFrame(width, height, color_model);
+                       accum = new VFrame(width, height, color_model, 0);
                        accum->clear_frame();
                }
                if( !overlay )
index 7f0706587dc6490f32913248ff268b178191559d..68312aea1dfbad854de472274266cea26ceab92b 100644 (file)
@@ -351,12 +351,8 @@ int FrameField::process_buffer(VFrame *frame,
 
                if(!src_frame)
                {
-                       src_frame = new VFrame(0,
-                               -1,
-                               frame->get_w(),
-                               frame->get_h(),
-                               frame->get_color_model(),
-                               -1);
+                       src_frame = new VFrame(frame->get_w(), frame->get_h(),
+                               frame->get_color_model(), 0);
                }
                ptr = src_frame;
        }
index 6dda2d71224e4714b62558a7563ed4f5c5e1ed1e..67904ed698ab7c3f233258c98255aa125fbda7f5 100644 (file)
@@ -258,12 +258,8 @@ int FreezeFrameMain::process_buffer(VFrame *frame,
        if(!first_frame && config.enabled)
        {
                if(!first_frame)
-                       first_frame = new VFrame(0,
-                               -1,
-                               frame->get_w(),
-                               frame->get_h(),
-                               frame->get_color_model(),
-                               -1);
+                       first_frame = new VFrame(frame->get_w(), frame->get_h(),
+                               frame->get_color_model(), 0);
 //printf("FreezeFrameMain::process_buffer 1 %jd\n", first_frame_position);
                read_frame(first_frame,
                                0,
index 66cf7bb99c464b037e663eede159d1f10a82717a..9d456d4fae317a5f71ad32f7c2955ccb75eaae31 100644 (file)
@@ -689,12 +689,9 @@ int GradientMain::process_buffer(VFrame *frame,
                gradient = 0;
        }
 
-       if(!gradient) gradient = new VFrame(0,
-               -1,
-               input->get_w(),
-               input->get_h(),
-               gradient_cmodel,
-               -1);
+       if(!gradient)
+               gradient = new VFrame(input->get_w(), input->get_h(),
+                       gradient_cmodel, 0);
 
        if(!engine) engine = new GradientServer(this,
                get_project_smp() + 1,
index 61a8c0d2a859271a0df91711135308a3c255d915..7a111923429c3ecf56869818786bc0c49323da2b 100644 (file)
@@ -195,10 +195,8 @@ total = 0;
        {
                case 0:
 /* step 1: grab frame-1 to buffer-1 */
-//                     tmp = new VFrame(0,
-//                             input_ptr->get_w(),
-//                             input_ptr->get_h(),
-//                             project_color_model);
+//                     tmp = new VFrame(input_ptr->get_w(),input_ptr->get_h(),
+//                             project_color_model, 0);
                        bgimage->copy_from(input_ptr);
                        break;
 
@@ -247,12 +245,8 @@ int HoloMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr)
                if(!effecttv)
                {
                        effecttv = new EffectTV(input_ptr->get_w(), input_ptr->get_h());
-                       bgimage = new VFrame(0,
-                               -1,
-                               input_ptr->get_w(),
-                               input_ptr->get_h(),
-                               input_ptr->get_color_model(),
-                               -1);
+                       bgimage = new VFrame(input_ptr->get_w(), input_ptr->get_h(),
+                               input_ptr->get_color_model(), 0);
 
                        for(int i = 0; i < 256; i++)
                        {
index 64fa589b188d109aef4ed3e7b28520977a4a9d94..cbb8fa7c2a745363ee47b599703babcc20bbf852 100644 (file)
@@ -278,7 +278,7 @@ int InterpolatePixelsMain::process_buffer(VFrame *frame,
                        delete out_temp;  out_temp = 0;
                }
                if( !out_temp )
-                       out_temp = new VFrame(0, -1, w, h, active_model, -1);
+                       out_temp = new VFrame(w, h, active_model, 0);
                out_frame = out_temp;
        }
 
index 6eab87b3140eac32af196c9e8000a8f167d38f19..83ff93b6a4beecbbfc0b58f999ff69909a31aee6 100644 (file)
@@ -777,12 +777,8 @@ int InterpolateVideo::process_buffer(VFrame *frame,
        {
                for(int i = 0; i < 2; i++)
                {
-                       frames[i] = new VFrame(0,
-                               -1,
-                               frame->get_w(),
-                               frame->get_h(),
-                               frame->get_color_model(),
-                               -1);
+                       frames[i] = new VFrame(frame->get_w(), frame->get_h(),
+                               frame->get_color_model(), 0);
                }
        }
 //printf("InterpolateVideo::process_buffer 1 %lld %lld\n", range_start, range_end);
index 57a47cca42ef345d87fe321cb8f2118c0184d2e5..8966ea5165d37581d83d80ebab35e48e1b58c071 100644 (file)
@@ -165,18 +165,12 @@ int IVTCMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr)
        int pattern_position = (PluginClient::source_position + config.frame_offset) % 5;
 
 //printf("IVTCMain::process_realtime %d %d\n", pattern_position, config.first_field);
-       if(!temp_frame[0]) temp_frame[0] = new VFrame(0,
-               -1,
-               input_ptr->get_w(),
-               input_ptr->get_h(),
-               input_ptr->get_color_model(),
-               -1);
-       if(!temp_frame[1]) temp_frame[1] = new VFrame(0,
-               -1,
-               input_ptr->get_w(),
-               input_ptr->get_h(),
-               input_ptr->get_color_model(),
-               -1);
+       if(!temp_frame[0])
+               temp_frame[0] = new VFrame(input_ptr->get_w(), input_ptr->get_h(),
+                       input_ptr->get_color_model(), 0);
+       if(!temp_frame[1])
+               temp_frame[1] = new VFrame(input_ptr->get_w(), input_ptr->get_h(),
+                       input_ptr->get_color_model(), 0);
 
        int row_size = VFrame::calculate_bytes_per_pixel(input_ptr->get_color_model()) * input_ptr->get_w();
        this->input = input_ptr;
index 8f6cab2feb3a43f45b0a34ddb085f90098930c9b..2557f9d196582f80e087266b5452e8ca67434913 100644 (file)
@@ -518,12 +518,9 @@ int LinearBlurMain::process_buffer(VFrame *frame,
        this->output = frame;
 
 
-       if(!temp) temp = new VFrame(0,
-               -1,
-               frame->get_w(),
-               frame->get_h(),
-               frame->get_color_model(),
-               -1);
+       if(!temp)
+               temp = new VFrame(frame->get_w(), frame->get_h(),
+                       frame->get_color_model(), 0);
        temp->copy_from(frame);
        this->input = temp;
 
index 6b5120283bee676d25db096a7f6c8ed137eac2b6..23edbc732d9d61daa4df0f82b32945b1e4018190 100644 (file)
@@ -454,12 +454,8 @@ int LiveVideo::process_buffer(VFrame *frame,
                {
                        if(!temp)
                        {
-                               temp = new VFrame(0,
-                                       -1,
-                                       session->vconfig_in->w,
-                                       session->vconfig_in->h,
-                                       input_cmodel,
-                                       -1);
+                               temp = new VFrame(session->vconfig_in->w, session->vconfig_in->h,
+                                               input_cmodel, 0);
                        }
                        input = temp;
                }
index b434e42a7b6c6b9756b92da357e3416c086a4bbd..fbbef54c3b5ee7bf80ef28cf4298400752dfcc36 100644 (file)
@@ -342,7 +342,7 @@ void MotionCVMain::allocate_temp(int w, int h, int color_model)
                temp_frame = 0;
        }
        if( !temp_frame )
-               temp_frame = new VFrame(w, h, color_model);
+               temp_frame = new VFrame(w, h, color_model, 0);
 }
 
 void MotionCVMain::process_global()
index 98722ded06ca58f072a0ec1966b736bf5793249b..e9c74573b026633e24215e3e6b52cd90dcb44bb5 100644 (file)
@@ -186,21 +186,9 @@ VFrame* MotionHVCache::get_image(int ratio,
 
 
 //PRINT_TRACE
-       VFrame *result = new VFrame();
-       result->set_use_shm(0);
-       result->reallocate(0, 
-               -1,
-               0,
-               0,
-               0,
-               downsampled_w + 1, 
-               downsampled_h + 1, 
-               src->get_color_model(), 
-               -1);
-       downsample_frame(result, 
-               src, 
-               ratio);
-       
+       VFrame *result =
+               new VFrame(downsampled_w+1, downsampled_h+1, src->get_color_model(), 0);
+       downsample_frame(result, src, ratio);
        
        MotionHVCacheItem *item = new MotionHVCacheItem();
        item->image = result;
index 6c4d6e07145176648560cfb5bb1112a92dd9b32f..0bded66c391bf53bfb3b5109862b855894006743 100644 (file)
@@ -602,17 +602,9 @@ printf("MotionHVScan::pixel_search %d range fail range2=%f\n", __LINE__, range2)
 // rotated_current[i]);
                        if(!rotated_current[i])
                        {
-                               rotated_current[i] = new VFrame();
-                               rotated_current[i]->set_use_shm(0);
-                               rotated_current[i]->reallocate(0,
-                                       -1,
-                                       0,
-                                       0,
-                                       0,
-                                       downsampled_current_w + 1,
-                                       downsampled_current_h + 1,
-                                       current_frame_arg->get_color_model(),
-                                       -1);
+                               rotated_current[i] =
+                                       new VFrame(downsampled_current_w+1, downsampled_current_h+1,
+                                               current_frame_arg->get_color_model(), 0);
 //printf("MotionHVScan::pixel_search %d\n", __LINE__);
                        }
 
index db9235eccb4ecf2ddf6a973ca90b3e33fb1cf438..4661b144ebd9e7dcae0c89fb8dc2b08d9257756d 100644 (file)
@@ -364,7 +364,7 @@ void MotionMain::allocate_temp(int w, int h, int color_model)
                temp_frame = 0;
        }
        if( !temp_frame )
-               temp_frame = new VFrame(w, h, color_model);
+               temp_frame = new VFrame(w, h, color_model, 0);
 }
 
 void MotionMain::process_global()
@@ -733,16 +733,16 @@ printf("MotionMain::process_buffer 2 rename tracking file: %s to %s\n",
 // The center of the search area is fixed in compensate mode or
 // the user value + the accumulation vector in track mode.
                if( !prev_global_ref )
-                       prev_global_ref = new VFrame(w, h, color_model);
+                       prev_global_ref = new VFrame(w, h, color_model, 0);
                if( !current_global_ref )
-                       current_global_ref = new VFrame(w, h, color_model);
+                       current_global_ref = new VFrame(w, h, color_model, 0);
 
 // Global loads the current target frame into the src and
 // writes it to the dst frame with desired translation.
                if( !global_target_src )
-                       global_target_src = new VFrame(w, h, color_model);
+                       global_target_src = new VFrame(w, h, color_model, 0);
                if( !global_target_dst )
-                       global_target_dst = new VFrame(w, h, color_model);
+                       global_target_dst = new VFrame(w, h, color_model, 0);
 
 // Load the global frames
                if( need_reload ) {
@@ -762,10 +762,10 @@ printf("MotionMain::process_buffer 2 rename tracking file: %s to %s\n",
 // The center of the search area is always the user value + the accumulation
 // vector.
                        if( !prev_rotate_ref )
-                               prev_rotate_ref = new VFrame(w, h, color_model);
+                               prev_rotate_ref = new VFrame(w, h, color_model, 0);
 // The current global reference is the current rotation reference.
                        if( !current_rotate_ref )
-                               current_rotate_ref = new VFrame(w, h, color_model);
+                               current_rotate_ref = new VFrame(w, h, color_model, 0);
                        current_rotate_ref->copy_from(current_global_ref);
 
 // The global target destination is copied to the rotation target source
@@ -774,9 +774,9 @@ printf("MotionMain::process_buffer 2 rename tracking file: %s to %s\n",
 // if we're tracking.
 // The pivot is fixed to the user position if we're compensating.
                        if( !rotate_target_src )
-                               rotate_target_src = new VFrame(w, h, color_model);
+                               rotate_target_src = new VFrame(w, h, color_model, 0);
                        if( !rotate_target_dst )
-                               rotate_target_dst = new VFrame(w, h, color_model);
+                               rotate_target_dst = new VFrame(w, h, color_model, 0);
                }
        }
 // Rotation only
@@ -784,16 +784,16 @@ printf("MotionMain::process_buffer 2 rename tracking file: %s to %s\n",
 // Rotation reads the previous reference frame and compares it with current
 // reference frame.
                if( !prev_rotate_ref )
-                       prev_rotate_ref = new VFrame(w, h, color_model);
+                       prev_rotate_ref = new VFrame(w, h, color_model, 0);
                if( !current_rotate_ref )
-                       current_rotate_ref = new VFrame(w, h, color_model);
+                       current_rotate_ref = new VFrame(w, h, color_model, 0);
 
 // Rotation loads target frame to temporary, rotates it, and writes it to the
 // target frame.  The pivot is always fixed.
                if( !rotate_target_src )
-                       rotate_target_src = new VFrame(w, h, color_model);
+                       rotate_target_src = new VFrame(w, h, color_model, 0);
                if( !rotate_target_dst )
-                       rotate_target_dst = new VFrame(w, h, color_model);
+                       rotate_target_dst = new VFrame(w, h, color_model, 0);
 
 
 // Load the rotate frames
@@ -1255,12 +1255,11 @@ void RotateScanUnit::process_package(LoadPackage *package)
 
                if( !rotater )
                        rotater = new AffineEngine(1, 1);
-               if( !temp ) temp = new VFrame(0,
-                       -1,
-                       server->previous_frame->get_w(),
-                       server->previous_frame->get_h(),
-                       color_model,
-                       -1);
+               if( !temp )
+                       temp = new VFrame(
+                               server->previous_frame->get_w(),
+                               server->previous_frame->get_h(),
+                               color_model, 0);
 //printf("RotateScanUnit::process_package %d\n", __LINE__);
 
 
index ad745c4f2b0fbb009bf80baa2fd698e513b9b497..5897ae0e0d768c29c2856a239da86b7511dad62b 100644 (file)
@@ -438,7 +438,7 @@ void MotionMain2::allocate_temp(int w, int h, int color_model)
                temp_frame = 0;
        }
        if(!temp_frame)
-               temp_frame = new VFrame(w, h, color_model);
+               temp_frame = new VFrame(w, h, color_model, 0);
 }
 
 
@@ -833,16 +833,16 @@ printf("MotionMain2::process_buffer 1 start_position=%jd\n", start_position);
 // The center of the search area is fixed in compensate mode or
 // the user value + the accumulation vector in track mode.
                if(!prev_global_ref)
-                       prev_global_ref = new VFrame(w, h, color_model);
+                       prev_global_ref = new VFrame(w, h, color_model, 0);
                if(!current_global_ref)
-                       current_global_ref = new VFrame(w, h, color_model);
+                       current_global_ref = new VFrame(w, h, color_model, 0);
 
 // Global loads the current target frame into the src and
 // writes it to the dst frame with desired translation.
                if(!global_target_src)
-                       global_target_src = new VFrame(w, h, color_model);
+                       global_target_src = new VFrame(w, h, color_model, 0);
                if(!global_target_dst)
-                       global_target_dst = new VFrame(w, h, color_model);
+                       global_target_dst = new VFrame(w, h, color_model, 0);
 
 
 // Load the global frames
index 483c6e5fc93419d63542ae0ad6b86eafbd4dbaad..cac4ed3a19f857156a3405482fb75f5f84902e11 100644 (file)
@@ -502,7 +502,7 @@ VFrame* Motion51Main::new_temp(VFrame *&tmp, VFrame *ref)
                delete tmp; tmp = 0;
        }
        if( !tmp )
-               tmp = new VFrame(0, -1, ref->get_w(), ref->get_h(), ref->get_color_model(), -1);
+               tmp = new VFrame(ref->get_w(), ref->get_h(), ref->get_color_model(), 0);
        return tmp;
 }
 
index 37df852f6c501484cd4fb9633b9a87ff482a9ead..a5bc3be5883c6f32208554517e68a075e1f9d0e0 100644 (file)
@@ -371,12 +371,8 @@ int MotionBlurMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr)
 
        if(input_ptr->get_rows()[0] == output_ptr->get_rows()[0])
        {
-               if(!temp) temp = new VFrame(0,
-                       -1,
-                       input_ptr->get_w(),
-                       input_ptr->get_h(),
-                       input_ptr->get_color_model(),
-                       -1);
+               if(!temp) temp = new VFrame(input_ptr->get_w(), input_ptr->get_h(),
+                       input_ptr->get_color_model(), 0);
                temp->copy_from(input_ptr);
                this->input = temp;
        }
index 3822ef1b61177dc4d459268729ebe2e125331f91..0b782ab5b02ac7c43231d71956b62f9bb9b0814c 100644 (file)
@@ -383,12 +383,9 @@ int OilEffect::process_realtime(VFrame *input, VFrame *output)
        {
                if(input->get_rows()[0] == output->get_rows()[0])
                {
-                       if(!temp_frame) temp_frame = new VFrame(0,
-                               -1,
-                               input->get_w(),
-                               input->get_h(),
-                               input->get_color_model(),
-                               -1);
+                       if(!temp_frame)
+                               temp_frame = new VFrame(input->get_w(), input->get_h(),
+                                       input->get_color_model(), 0);
                        temp_frame->copy_from(input);
                        this->input = temp_frame;
                }
index a041a10f7d5f080b7f7996d0388dde2ccffef205..5f0ea80f198d92513a97a2706902b6076e163e90 100644 (file)
@@ -408,8 +408,8 @@ int Overlay::process_buffer(VFrame **frame,
 
        if( --layers > 0 ) {    // need 2 layers to do overlay
                if( !temp )
-                       temp = new VFrame(0, -1, frame[0]->get_w(), frame[0]->get_h(),
-                                       frame[0]->get_color_model(), -1);
+                       temp = new VFrame(frame[0]->get_w(), frame[0]->get_h(),
+                                       frame[0]->get_color_model(), 0);
 
                while( --layers >= 0 ) {
                        current_layer += step;
index ea1aa4d7bee08398763e75f8fda1e5cb8e3f6006..a9e2adf3bb676fe4aca0d7fbb0a8e77fef4da23f 100644 (file)
@@ -836,7 +836,7 @@ int PerspectiveMain::process_buffer(VFrame *frame,
                        }
                }
                if( !temp )
-                       temp = new VFrame(need_w, need_h, color_model);
+                       temp = new VFrame(need_w, need_h, color_model, 0);
                break;
        }
        switch( config.mode ) {
index 68e378bd07d308890d5c4ef192f9180c591fa9b8..f226720ac6023a087b1c6f9f5cf2de1308913998 100644 (file)
@@ -354,12 +354,9 @@ int PolarEffect::process_realtime(VFrame *input, VFrame *output)
        {
                if(input->get_rows()[0] == output->get_rows()[0])
                {
-                       if(!temp_frame) temp_frame = new VFrame(0,
-                               -1,
-                               input->get_w(),
-                               input->get_h(),
-                               input->get_color_model(),
-                               -1);
+                       if(!temp_frame)
+                               temp_frame = new VFrame(input->get_w(), input->get_h(),
+                                       input->get_color_model(), 0);
                        temp_frame->copy_from(input);
                        this->input = temp_frame;
                }
index 7f141409e1126ed80537ef4c95f027aed6f9d49f..969b8694121838f68986cbb1bc8367b167a57f56 100644 (file)
@@ -413,12 +413,9 @@ int RadialBlurMain::process_buffer(VFrame *frame,
        this->output = frame;
 
 
-       if(!temp) temp = new VFrame(0,
-               -1,
-               frame->get_w(),
-               frame->get_h(),
-               frame->get_color_model(),
-               -1);
+       if(!temp)
+               temp = new VFrame(frame->get_w(), frame->get_h(),
+                       frame->get_color_model(), 0);
        temp->copy_from(frame);
        this->input = temp;
 
index 21dd42745b12fedf148d4ed2f6e8d337b2827b0e..165680a2f7b5c821dd0c648b32c0b744d2b9b7f1 100644 (file)
@@ -342,7 +342,7 @@ int RGBShiftEffect::process_realtime(VFrame *input, VFrame *output)
                        delete temp_frame;  temp_frame = 0;
                }
                if( !temp_frame )
-                       temp_frame = new VFrame(w, h, color_model);
+                       temp_frame = new VFrame(w, h, color_model, 0);
                frame = temp_frame;
                if( color_model != input->get_color_model() )
                        BC_CModels::transfer(frame->get_rows(), input->get_rows(),
index 5c5944a74296f02a792dfec7a8fca438caf04bb2..52073c10c7ebdf19e987d1ee42d6818596f359b5 100644 (file)
@@ -181,9 +181,8 @@ int ScaleRatioMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr)
                        temp_frame = 0;
                }
                if(!temp_frame)
-                       temp_frame = new VFrame(0, -1,
-                               input_ptr->get_w(), input_ptr->get_h(),
-                               input->get_color_model(), -1);
+                       temp_frame = new VFrame(input_ptr->get_w(), input_ptr->get_h(),
+                               input->get_color_model(), 0);
                temp_frame->copy_from(input);
                input = temp_frame;
        }
index af4a79d467df526af7fd7f33a77117c1ba3affaa..9a7f77442dc4ff241d4b6139883e644332c6d7e1 100644 (file)
@@ -194,7 +194,7 @@ int SvgMain::process_realtime(VFrame *input, VFrame *output)
                        close(fd);
                        if( ofrm && ofrm->get_color_model() != output->get_color_model() ) {
                                VFrame *vfrm = new VFrame(ofrm->get_w(), ofrm->get_h(),
-                                       output->get_color_model());
+                                       output->get_color_model(), 0);
                                vfrm->transfer_from(ofrm);
                                delete ofrm;  ofrm = vfrm;
                        }
index 8284b6fa03706a24e8b77bd4012f3324fb502d4f..e9c24ea7b7628b7508a36e4ffdc4170c22abe281 100644 (file)
@@ -301,12 +301,9 @@ int SwapFrames::process_buffer(VFrame *frame,
        if(new_position > prev_frame + 1)
        {
 //printf("SwapFrames::process_buffer %d\n", __LINE__);
-               if(!buffer) buffer = new VFrame(0,
-                       -1,
-                       frame->get_w(),
-                       frame->get_h(),
-                       frame->get_color_model(),
-                       -1);
+               if(!buffer)
+                       buffer = new VFrame(frame->get_w(), frame->get_h(),
+                               frame->get_color_model(), 0);
                buffer_position = new_position - 1;
                read_frame(buffer,
                        0,
index fa055c3fb24d0a19daf7d05e45fb0c1411bf7421..02ce4f5d73a56d1607a8a2d646099711178ac22c 100644 (file)
@@ -214,7 +214,7 @@ int TimeAvgMain::process_buffer(VFrame *frame,
 // Create new frames
                                for( ; i < config.frames; i++)
                                {
-                                       history2[i] = new VFrame(w, h, color_model);
+                                       history2[i] = new VFrame(w, h, color_model, 0);
                                        history_frame2[i] = -0x7fffffff;
                                        history_valid2[i] = 0;
                                }
@@ -231,7 +231,7 @@ int TimeAvgMain::process_buffer(VFrame *frame,
                {
                        history = new VFrame*[config.frames];
                        for(int i = 0; i < config.frames; i++)
-                               history[i] = new VFrame(w, h, color_model);
+                               history[i] = new VFrame(w, h, color_model, 0);
                        history_size = config.frames;
                        history_frame = new int64_t[config.frames];
                        bzero(history_frame, sizeof(int64_t) * config.frames);
index 76cdcd448cdc2a7d01eaa64f15bcd360d884c97e..82dbd59a9978842aea91b8cba0cfe5f72e971e49 100644 (file)
@@ -765,10 +765,8 @@ int TimeFrontMain::process_buffer(VFrame **frame,
 {
        VFrame **outframes = frame;
        VFrame *(framelist[1024]);
-       framelist[0] = new VFrame (
-               outframes[0]->get_w(),
-               outframes[0]->get_h(),
-               outframes[0]->get_color_model());
+       framelist[0] = new VFrame (outframes[0]->get_w(), outframes[0]->get_h(),
+                       outframes[0]->get_color_model(), 0);
        read_frame(framelist[0],
                0,
                start_position,
@@ -798,11 +796,8 @@ int TimeFrontMain::process_buffer(VFrame **frame,
        {
                need_reconfigure = 0;
 
-               if(!gradient) gradient = new VFrame(
-                       outframes[0]->get_w(),
-                       outframes[0]->get_h(),
-                       BC_A8);
-
+               if(!gradient)
+                       gradient = new VFrame( outframes[0]->get_w(), outframes[0]->get_h(), BC_A8, 0); 
 
                if (config.shape != TimeFrontConfig::OTHERTRACK &&
                    config.shape != TimeFrontConfig::ALPHA)
@@ -816,10 +811,8 @@ int TimeFrontMain::process_buffer(VFrame **frame,
        }
        if (config.shape == TimeFrontConfig::ALPHA)
        {
-               if(!gradient) gradient = new VFrame(
-                       outframes[0]->get_w(),
-                       outframes[0]->get_h(),
-                       BC_A8);
+               if(!gradient)
+                       gradient = new VFrame(outframes[0]->get_w(), outframes[0]->get_h(), BC_A8, 0);
                VFrame *tfframe = framelist[0];
                switch (tfframe->get_color_model())
                {
@@ -844,10 +837,8 @@ int TimeFrontMain::process_buffer(VFrame **frame,
        } else
        if (config.shape == TimeFrontConfig::OTHERTRACK)
        {
-               if(!gradient) gradient = new VFrame(
-                       outframes[0]->get_w(),
-                       outframes[0]->get_h(),
-                       BC_A8);
+               if(!gradient)
+                       gradient = new VFrame(outframes[0]->get_w(), outframes[0]->get_h(), BC_A8, 0);
                VFrame *tfframe = outframes[1];
                read_frame(tfframe,
                        1,
@@ -912,10 +903,8 @@ int TimeFrontMain::process_buffer(VFrame **frame,
        {
                for (int i = 1; i <= config.frame_range; i++)
                {
-                       framelist[i] = new VFrame (
-                               outframes[0]->get_w(),
-                               outframes[0]->get_h(),
-                               outframes[0]->get_color_model());
+                       framelist[i] = new VFrame (outframes[0]->get_w(), outframes[0]->get_h(),
+                                       outframes[0]->get_color_model(), 0);
 
                        read_frame(framelist[i],
                                0,
index e52da6db3b74ef5482357d34638ce54538f1db82..060e3eb9f2b49270a7975bc1d6e4332068999e0a 100644 (file)
@@ -1464,7 +1464,7 @@ void TitleMain::draw_background()
                        delete bg_frame;  bg_frame = 0;
                }
                if( !bg_frame )
-                       bg_frame = new VFrame(0, -1, bw, bh, output_model, -1);
+                       bg_frame = new VFrame(bw, bh, output_model);
                int64_t position = get_source_position() - get_source_start();
                if( !read_background(bg_frame, position, output_model) ) {
                        if( !overlay_frame )
@@ -1607,7 +1607,8 @@ VFrame *TitleMain::add_image(const char *path)
        VFrame *vframe = get_image(path);
        if( !vframe && (vframe=VFramePng::vframe_png(path)) != 0 ) {
                if( vframe->get_color_model() != text_model ) {
-                       VFrame *frame = new VFrame(vframe->get_w(), vframe->get_h(), text_model);
+                       VFrame *frame = new VFrame(vframe->get_w(), vframe->get_h(),
+                               text_model, 0);
                        frame->transfer_from(vframe);  delete vframe;
                        vframe = frame;
                }
index 7d00ee28d8c9351373ae8d541d5b8d32d2cf305d..ce112b04349ddffb9e92d984ab7938c7f4f5f017 100644 (file)
@@ -193,12 +193,8 @@ int TranslateMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr)
                        temp_frame = 0;
                }
                if(!temp_frame)
-                       temp_frame = new VFrame(0,
-                               -1,
-                               input_ptr->get_w(),
-                               input_ptr->get_h(),
-                               input->get_color_model(),
-                               -1);
+                       temp_frame = new VFrame(input_ptr->get_w(), input_ptr->get_h(),
+                               input->get_color_model(), 0);
                temp_frame->copy_from(input);
                input = temp_frame;
        }
index 9193e52ae3f768ade5098b23d4df0e7a8fac72ad..82b750ce46c95e0d0d5d99d3b64a8ed840ac5121 100644 (file)
@@ -526,12 +526,8 @@ int WaveEffect::process_realtime(VFrame *input, VFrame *output)
        {
                if(input->get_rows()[0] == output->get_rows()[0])
                {
-                       if(!temp_frame) temp_frame = new VFrame(0,
-                               -1,
-                               input->get_w(),
-                               input->get_h(),
-                               input->get_color_model(),
-                               -1);
+                       if(!temp_frame) temp_frame = new VFrame(input->get_w(), input->get_h(),
+                               input->get_color_model(), 0);
                        temp_frame->copy_from(input);
                        this->input = temp_frame;
                }
index 6c920dfcf8b7ccd0c812eeddac31adce12124e63..3b0344902fd8d50e61e522cb53b5389e761258cd 100644 (file)
@@ -448,12 +448,8 @@ int WhirlEffect::process_realtime(VFrame *input, VFrame *output)
        {
                if(input->get_rows()[0] == output->get_rows()[0])
                {
-                       if(!temp_frame) temp_frame = new VFrame(0,
-                               -1,
-                               input->get_w(),
-                               input->get_h(),
-                               input->get_color_model(),
-                               -1);
+                       if(!temp_frame) temp_frame = new VFrame(input->get_w(), input->get_h(),
+                               input->get_color_model(), 0);
                        temp_frame->copy_from(input);
                        this->input = temp_frame;
                }
index 6b3900b5fde127cbf6d450cca9e3ba1ea019448b..84ead782ae1a9465cdd50efd56e2b848feb45edc 100644 (file)
@@ -166,7 +166,7 @@ int yuv411Main::process_realtime(VFrame *input_ptr, VFrame *output_ptr)
                        temp_frame = 0;
                }
                if( !temp_frame )
-                       temp_frame = new VFrame(w, h, colormodel);
+                       temp_frame = new VFrame(w, h, colormodel, 0);
                if( input_ptr == output_ptr ) {
                        temp_frame->copy_from(input_ptr);
                        input_ptr = temp_frame;
index e16364a2f9ce73cbf96c33332ae5cde54ec9ff2f..558c4804d42fe351064d97d27f15a1e8270239c7 100644 (file)
@@ -343,7 +343,7 @@ int YUVShiftEffect::process_realtime(VFrame *input, VFrame *output)
                        delete temp_frame;  temp_frame = 0;
                }
                if( !temp_frame )
-                       temp_frame = new VFrame(w, h, color_model);
+                       temp_frame = new VFrame(w, h, color_model, 0);
                frame = temp_frame;
                if( color_model != input->get_color_model() )
                        BC_CModels::transfer(frame->get_rows(), input->get_rows(),
index 1ab1a7e3d4f322c6a55bc3d6d9d906c0fbdf70ce..b5c74d0373d35763253658f5a295abf8b7932a08 100644 (file)
@@ -253,41 +253,22 @@ int ZoomMain::process_realtime(VFrame *incoming, VFrame *outgoing)
 
        if(is_before)
        {
-               if(!temp) temp = new VFrame(outgoing->get_w(),
-                       outgoing->get_h(),
-                       outgoing->get_color_model());
+               if(!temp) temp = new VFrame(outgoing->get_w(), outgoing->get_h(),
+                       outgoing->get_color_model(), 0);
                temp->clear_frame();
-               overlayer->overlay(temp,
-                       outgoing,
-                       in_x,
-                       in_y,
-                       in_x + in_w,
-                       in_y + in_h,
-                       0,
-                       0,
-                       temp->get_w(),
-                       temp->get_h(),
-                       1.0,
-                       TRANSFER_REPLACE,
-                       CUBIC_LINEAR);
+               overlayer->overlay(temp, outgoing,
+                       in_x, in_y, in_x + in_w, in_y + in_h,
+                       0, 0, temp->get_w(), temp->get_h(),
+                       1.0, TRANSFER_REPLACE, CUBIC_LINEAR);
                outgoing->copy_from(temp);
        }
        else
        {
                outgoing->clear_frame();
-               overlayer->overlay(outgoing,
-                       incoming,
-                       in_x,
-                       in_y,
-                       in_x + in_w,
-                       in_y + in_h,
-                       0,
-                       0,
-                       temp->get_w(),
-                       temp->get_h(),
-                       1.0,
-                       TRANSFER_REPLACE,
-                       CUBIC_LINEAR);
+               overlayer->overlay(outgoing, incoming,
+                       in_x, in_y, in_x + in_w, in_y + in_h,
+                       0, 0, temp->get_w(), temp->get_h(),
+                       1.0, TRANSFER_REPLACE, CUBIC_LINEAR);
        }
 
        return 0;
index d26928e5d1ed924528149aaa2846aa30ec5a8195..aa7e87b1c210dc3f9d611fd077d8a5194146f98e 100644 (file)
@@ -566,12 +566,8 @@ SET_TRACE
        this->output = frame;
 
 
-       if(!temp) temp = new VFrame(0,
-               -1,
-               frame->get_w(),
-               frame->get_h(),
-               frame->get_color_model(),
-               -1);
+       if(!temp) temp = new VFrame(frame->get_w(), frame->get_h(),
+               frame->get_color_model(), 0);
        temp->copy_from(frame);
        this->input = temp;