X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fproxy.C;h=d126cf142f19d03f1026a661fb9ceed07c2fa89b;hp=537fc40a1c75301a5d7b5edd036735c64c45d657;hb=8d1431081df60da0719db2c77e4c56830521c7e8;hpb=ea0dfe3cd57bb60ef824cd0d3512fcd251020c76 diff --git a/cinelerra-5.1/cinelerra/proxy.C b/cinelerra-5.1/cinelerra/proxy.C index 537fc40a..d126cf14 100644 --- a/cinelerra-5.1/cinelerra/proxy.C +++ b/cinelerra-5.1/cinelerra/proxy.C @@ -80,6 +80,7 @@ ProxyThread::ProxyThread(MWindow *mwindow) ProxyThread::~ProxyThread() { for( int i=0; iremove_user(); } BC_Window* ProxyThread::new_gui() @@ -121,9 +122,14 @@ void ProxyThread::calculate_sizes() int orig_h = mwindow->edl->session->output_h * orig_scale; if( !use_scaler ) { +// w,h should stay even for yuv + int ow = orig_w, oh = orig_h; + if( BC_CModels::is_yuv(mwindow->edl->session->color_model) ) { + ow /= 2; oh /= 2; + } for( int i=2; ivideo_data = 1; proxy_asset->layers = 1; proxy_asset->width = orig_asset->width / new_scale; + if( proxy_asset->width & 1 ) ++proxy_asset->width; proxy_asset->actual_width = proxy_asset->width; proxy_asset->height = orig_asset->height / new_scale; + if( proxy_asset->height & 1 ) ++proxy_asset->height; proxy_asset->actual_height = proxy_asset->height; proxy_asset->frame_rate = orig_asset->frame_rate; proxy_asset->video_length = orig_asset->video_length; @@ -473,8 +481,11 @@ void ProxyWindow::update() // thread->orig_scale, thread->new_scale); int orig_w = mwindow->edl->session->output_w * thread->orig_scale; int orig_h = mwindow->edl->session->output_h * thread->orig_scale; - sprintf(string, "%dx%d", - orig_w / thread->new_scale, orig_h / thread->new_scale); + int new_w = orig_w / thread->new_scale; + if( new_w & 1 ) ++new_w; + int new_h = orig_h / thread->new_scale; + if( new_h & 1 ) ++new_h; + sprintf(string, "%dx%d", new_w, new_h); new_dimensions->update(string); thread->scale_to_text(string, thread->new_scale); scale_factor->set_text(string);