X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.0%2Fguicast%2Fbcbitmap.C;h=c508de5c00edcbffa56113a375a533408689e5c9;hb=0c9155dd01b6745f908e12c6a202c671a8f09514;hp=6515d1853b9ba69557744cd9e8f8c3eaae0b2ab1;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/guicast/bcbitmap.C b/cinelerra-5.0/guicast/bcbitmap.C index 6515d185..c508de5c 100644 --- a/cinelerra-5.0/guicast/bcbitmap.C +++ b/cinelerra-5.0/guicast/bcbitmap.C @@ -150,7 +150,7 @@ BC_XvShmImage::BC_XvShmImage(BC_Bitmap *bitmap, int index, h = xv_image->height; if(!XShmAttach(top_level->display, &shm_info)) perror("BC_XvShmImage::BC_XvShmImage XShmAttach"); - if( color_model == BC_YUV422 ) { + if( color_model == BC_YUV422 || color_model == BC_UVY422 ) { bytesPerLine = w*2; bitsPerPixel = 12; row_data = new unsigned char*[h]; @@ -223,7 +223,7 @@ BC_XvImage::BC_XvImage(BC_Bitmap *bitmap, int index, xv_image->data = (char *) data; w = xv_image->width; h = xv_image->height; - if( color_model == BC_YUV422 ) { + if( color_model == BC_YUV422 || color_model == BC_UVY422 ) { int bytesPerLine = w*2; row_data = new unsigned char*[h]; for( int i=0; iparent_window = parent_window; this->top_level = parent_window->top_level; this->xv_portid = resources->use_xvideo ? top_level->xvideo_port_id : -1; + if( w < 1 ) w = 1; + if( h < 1 ) h = 1; this->w = w; this->h = h; this->color_model = color_model; @@ -652,6 +654,7 @@ int BC_Bitmap::read_frame(VFrame *frame, break; default: case BC_YUV422: + case BC_UVY422: memcpy(get_data(), frame->get_data(), w * h + w * h); break; }