if(!srcP || !src || !srcN) { data->duplicate(vidCache->getImage(inframe)); vidCache->unlockAll(); return 1; }
uint8_t vidBlendRemoval::getFrameNumberNoAlloc (uint32_t inframe,                                uint32_t * len,                                ADMImage * data, uint32_t * flags){		ADMImage *srcP,*srcN,*src,*final,*display;        float distMerged, distN,distP,distM,distR,skip=0;        char txt[255];                if(inframe<1 || inframe>inframe>_info.nb_frames-2 )        {                skip=1;        }        if(inframe && _lastRemoved==inframe-1)        {                skip=1;        }                if(skip)        {                data->duplicate(vidCache->getImage(inframe));                vidCache->unlockAll();                return 1;        }                        srcP=vidCache->getImage(inframe-1);        src=vidCache->getImage(inframe);        srcN=vidCache->getImage(inframe+1);                       rebuild->merge(srcP,srcN);                distP=ADMImage::lumaDiff(src,srcN,_param->noise);        distN=ADMImage::lumaDiff(src,srcP,_param->noise);        distM=ADMImage::lumaDiff(src,rebuild,_param->noise);                                        double medium;         if(distN>1&&distP>1)        {                if(distP>distN) medium=distN;                          else  medium=distP;                  //medium=min(distM,distR);                                  medium/=100;                 distN/=medium;                 distP/=medium;                 distM/=medium;                  }                medium=medium/(_info.width*_info.height);        medium*=1000;        if(distM<_param->threshold && medium>_param->identical) // medium is how close pictures are, too close, we discard        {                data->duplicate(srcP);                _lastRemoved=inframe;                if(_param->show )                {                        sprintf(txt,"Dupe");                        drawString(data,2,5,txt);                      }        }        else                data->duplicate(src);        if(_param->show)        {                display=data;                sprintf(txt," N %02.1f",distN);                drawString(display,2,0,txt);                sprintf(txt," P %02.1f",distP);                drawString(display,2,1,txt);                sprintf(txt," M %02.1f",distM);                drawString(display,2,2,txt);                sprintf(txt," %% %02.1f",medium);                drawString(display,2,3,txt);        }                  vidCache->unlockAll();	return 1;}