/**
    \fn getFrame
    \brief Get a processed frame
*/
bool unstackFieldFilter::getNextFrame(uint32_t *fn,ADMImage *image)
{
    // since we do nothing, just get the output of previous filter
    if(false==previousFilter->getNextFrame(fn,current))
    {
        ADM_warning("unstackField : Cannot get frame\n");
        return false;
    }
    // do in place flip
    image->copyInfo(current);
    for(int i=PLANAR_Y;i<PLANAR_LAST;i++)
    {
        ADM_PLANE plane=(ADM_PLANE)i;
        uint32_t srcPitch=current->GetPitch(plane);
        uint32_t dstPitch=image->GetPitch(plane);
        uint8_t  *src=current->GetReadPtr(plane);
        uint8_t  *dst=image->GetWritePtr(plane);
        uint32_t w=info.width;
        uint32_t h=info.height;
        if(plane)
                {
                        w>>=1;
                        h>>=1;
                }
        // Even
        BitBlit(dst, dstPitch*2,src,srcPitch,w,h/2);
        BitBlit(dst+dstPitch, dstPitch*2,src+(srcPitch*h)/2,srcPitch,w,h/2);
        
    }
    return true;
}
Exemple #2
0
/**
    \fn getNextFrame
    \brief
*/
bool         ADMVideoHue::getNextFrame(uint32_t *fn,ADMImage *image)
{
ADMImage *src;
        src=vidCache->getImage(nextFrame);
        if(!src)
            return false; // EOF
        *fn=nextFrame++;
        image->copyInfo(src);

        image->copyPlane(src,image,PLANAR_Y); // Luma is untouched

        HueProcess_C(image->GetWritePtr(PLANAR_V), image->GetWritePtr(PLANAR_U),
                     src->GetReadPtr(PLANAR_V), src->GetReadPtr(PLANAR_U),
                    
                image->GetPitch(PLANAR_U),src->GetPitch(PLANAR_U), // assume u&v pitches are =
                info.width>>1,info.height>>1, 
                _hue, _saturation);
 
        vidCache->unlockAll();
        return 1;
}