X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe.C;h=8e90cca1c6f0cba5013597ed50e11aa9fa56d68a;hb=d8ce2345fd2aff5f329056474b442fa810848f42;hp=af0e52a85d1e186fba228ce8bd88777ba2e7855f;hpb=d6c6d4a07f9ff4c6b8f5d034306df375815b060a;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C index af0e52a8..8e90cca1 100644 --- a/cinelerra-5.1/guicast/vframe.C +++ b/cinelerra-5.1/guicast/vframe.C @@ -334,7 +334,7 @@ if( memory_type != VFrame::SHARED ) shmid = -1; break; - case VFrame::SHMGET: + case VFrame::SHM_GET: if(data) shmdt(data); data = 0; @@ -510,7 +510,7 @@ int VFrame::allocate_data(unsigned char *data, int shmid, this->v_offset = v_offset; } else if( shmid >= 0 ) { - memory_type = VFrame::SHMGET; + memory_type = VFrame::SHM_GET; this->data = (unsigned char*)shmat(shmid, NULL, 0); if( this->data == (unsigned char*)-1 ) { printf("VFrame::allocate_data %d could not attach" @@ -593,7 +593,7 @@ void VFrame::set_memory(unsigned char *data, else if(shmid >= 0) { - memory_type = VFrame::SHMGET; + memory_type = VFrame::SHM_GET; this->data = (unsigned char*)shmat(shmid, NULL, 0); this->shmid = shmid; } @@ -635,7 +635,7 @@ void VFrame::set_compressed_memory(unsigned char *data, else if(shmid >= 0) { - memory_type = VFrame::SHMGET; + memory_type = VFrame::SHM_GET; this->data = (unsigned char*)shmat(shmid, NULL, 0); this->shmid = shmid; } @@ -713,7 +713,7 @@ UNBUFFER(data); else free(data); } - else if( memory_type == VFrame::SHMGET ) { + else if( memory_type == VFrame::SHM_GET ) { if( data ) shmdt(data); } @@ -1403,12 +1403,12 @@ int VFrame::get_memory_usage() // a (~alpha) transparency, 0x00==solid .. 0xff==transparent void VFrame::set_pixel_color(int rgb, int a) { - pixel_rgb = (~a<<24) | (rgb&0xffffff); + pixel_rgb = (~(unsigned int)a<<24) | (rgb&0xffffff); int ir = 0xff & (pixel_rgb >> 16); int ig = 0xff & (pixel_rgb >> 8); int ib = 0xff & (pixel_rgb >> 0); YUV::yuv.rgb_to_yuv_8(ir, ig, ib); - pixel_yuv = (~a<<24) | (ir<<16) | (ig<<8) | (ib<<0); + pixel_yuv = (~(unsigned int)a<<24) | (ir<<16) | (ig<<8) | (ib<<0); } void VFrame::set_stiple(int mask)