X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fguicast%2Fvframe.C;h=e3f5bf0a9e668cd1ac401658d6f7e7f492bc2c7a;hb=5aad2133f228b736f033d6c48e1629078b858286;hp=a3b09324bd6f59f5e5122874fd82094615925054;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/guicast/vframe.C b/cinelerra-5.0/guicast/vframe.C index a3b09324..e3f5bf0a 100644 --- a/cinelerra-5.0/guicast/vframe.C +++ b/cinelerra-5.0/guicast/vframe.C @@ -1042,6 +1042,7 @@ int VFrame::transfer_from(VFrame *that, int bg_color) return this->copy_from(that); timestamp = that->timestamp; +#if 0 BC_CModels::transfer( this->get_rows(), that->get_rows(), // Packed data out/in this->get_y(), this->get_u(), this->get_v(), // Planar data out/in @@ -1051,6 +1052,33 @@ int VFrame::transfer_from(VFrame *that, int bg_color) that->get_color_model(), this->get_color_model(), // Color models in/out bg_color, // alpha blend bg_color that->get_w(), this->get_w()); // rowspans (of luma for YUV) +#else + unsigned char *in_ptrs[4], *out_ptrs[4]; + unsigned char **inp, **outp; + if( BC_CModels::is_planar(that->get_color_model()) ) { + in_ptrs[0] = that->get_y(); + in_ptrs[1] = that->get_u(); + in_ptrs[2] = that->get_v(); + in_ptrs[3] = that->get_a(); + inp = in_ptrs; + } + else + inp = that->get_rows(); + if( BC_CModels::is_planar(this->get_color_model()) ) { + out_ptrs[0] = this->get_y(); + out_ptrs[1] = this->get_u(); + out_ptrs[2] = this->get_v(); + out_ptrs[3] = this->get_a(); + outp = out_ptrs; + } + else + outp = this->get_rows(); + BC_CModels::transfer(outp, this->get_color_model(), + 0, 0, this->get_w(), this->get_h(), this->get_w(), + inp, that->get_color_model(), + 0, 0, that->get_w(), that->get_h(), that->get_w(), + bg_color); +#endif return 0; }