X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fxfer.C;h=f5c521961105893957209b4d8a3c21298d6169f7;hb=4d515bb7ba93b462bc7871b38cdceec988c1e733;hp=87ad6bdd5b619971865f53a14f8a7b2b552722fc;hpb=1f78d86b5532943b2a3ea51f409a1fe5bd961e02;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/xfer.C b/cinelerra-5.1/guicast/xfer.C index 87ad6bdd..f5c52196 100644 --- a/cinelerra-5.1/guicast/xfer.C +++ b/cinelerra-5.1/guicast/xfer.C @@ -106,7 +106,8 @@ void BC_Xfer::init( switch( in_colormodel ) { case BC_UVY422: case BC_YUV422: in_w &= ~1; break; // 2x1 - case BC_YUV420P: in_w &= ~1; in_h &= ~1; break; // 2x2 + case BC_YUV420P: + case BC_YUV420PI: in_w &= ~1; in_h &= ~1; break; // 2x2 case BC_YUV422P: in_w &= ~1; break; // 2x1 case BC_YUV410P: in_w &= ~3; in_h &= ~3; break; // 4x4 case BC_YUV411P: in_w &= ~3; break; // 4x1 @@ -114,7 +115,8 @@ void BC_Xfer::init( switch( out_colormodel ) { case BC_UVY422: case BC_YUV422: out_w &= ~1; break; - case BC_YUV420P: out_w &= ~1; out_h &= ~1; break; + case BC_YUV420P: + case BC_YUV420PI: out_w &= ~1; out_h &= ~1; break; case BC_YUV422P: out_w &= ~1; break; case BC_YUV410P: out_w &= ~3; out_h &= ~3; break; case BC_YUV411P: out_w &= ~3; break; @@ -162,7 +164,7 @@ void BC_Xfer::init( this->out_pixelsize = BC_CModels::calculate_pixelsize(out_colormodel); this->scale = (out_w != in_w) || (in_x != 0); -/* + 1 so we don't overflow when calculating in advance */ +/* + 1 so we don't overflow when calculating in advance */ column_table = new int[out_w+1]; double hscale = (double)in_w/out_w; for( int i=0; ilock("BC_Xfer::SlicerList::get_slicer"); } - Slicer *slicer = first; - remove_pointer(slicer); + else + remove_pointer(slicer); return slicer; } void BC_Xfer::xfer_slices(int slices) { if( !xfn ) return; - int max_slices = BC_Resources::machine_cpus/2+1; + int max_slices = BC_Resources::machine_cpus/2; if( slices > max_slices ) slices = max_slices; + if( slices < 1 ) slices = 1; Slicer *active[slices]; unsigned y0 = 0, y1 = out_h; int slices1 = slices-1; @@ -310,6 +310,7 @@ void BC_Xfer::xfer_slices(int slices) slicers.lock("BC_Xfer::xfer_slices"); for( int i=0; islice(this, y0, y1); @@ -324,7 +325,6 @@ void BC_Xfer::xfer_slices(int slices) for( int i=0; iunlock(); } }