comparison libmpcodecs/vf_spp.c @ 13729:045dbaccaccc

crash with Y8 colourspace fixed
author reimar
date Thu, 21 Oct 2004 16:47:42 +0000
parents 821f464b4d90
children 803be9a78854
comparison
equal deleted inserted replaced
13728:9534e44139e9 13729:045dbaccaccc
382 const int stride= is_luma ? p->temp_stride : ((width+16+15)&(~15)); 382 const int stride= is_luma ? p->temp_stride : ((width+16+15)&(~15));
383 uint64_t block_align[32]; 383 uint64_t block_align[32];
384 DCTELEM *block = (DCTELEM *)block_align; 384 DCTELEM *block = (DCTELEM *)block_align;
385 DCTELEM *block2= (DCTELEM *)(block_align+16); 385 DCTELEM *block2= (DCTELEM *)(block_align+16);
386 386
387 if (!src || !dst) return; // HACK avoid crash for Y8 colourspace
387 for(y=0; y<height; y++){ 388 for(y=0; y<height; y++){
388 int index= 8 + 8*stride + y*stride; 389 int index= 8 + 8*stride + y*stride;
389 memcpy(p->src + index, src + y*src_stride, width); 390 memcpy(p->src + index, src + y*src_stride, width);
390 for(x=0; x<8; x++){ 391 for(x=0; x<8; x++){
391 p->src[index - x - 1]= p->src[index + x ]; 392 p->src[index - x - 1]= p->src[index + x ];