Ejemplo n.º 1
0
static TVC_STATUS _ConfigTarSize(void)
{
    _SIZE srcSize = _tvcContext.srcSize;
    _SIZE tarSize = {0};

#if FIXED_WVGA_PARAMS
#if 0
if (is_used_tar_size_for_hqa) {
    tarSize.width  = 720;
    tarSize.height = 576;
} else {
    tarSize.width  = TV_OUTPUT_WIDTH;
    tarSize.height = TV_OUTPUT_HEIGHT;
}
#else
    tarSize.width  = TV_OUTPUT_WIDTH;
    tarSize.height = TV_OUTPUT_HEIGHT;
#endif
#endif    

    _SetTarSize(tarSize.width, tarSize.height);
    _tvcContext.tarSize = tarSize;

    _SetResizCoeff(srcSize, tarSize);

    return TVC_STATUS_OK;
}
Ejemplo n.º 2
0
void TVC_ConfigSize(unsigned int src_width, unsigned int src_height, unsigned int tar_width, unsigned int tar_height)
{

    _SIZE tarSize = {0};

    TV_INFO("src %d, %d, tar %d, %d\n", src_width, src_height, tar_width, tar_height);


    //src size
    if (_tvcContext.srcSize.width != src_width ||
        _tvcContext.srcSize.height != src_height)
    {
        _tvcContext.srcSize.width  = src_width;
        _tvcContext.srcSize.height = src_height;
        _tvcContext.srcFormatSizeDirty = TRUE;
    }
    // Config Source Size
    OUTREG32(&TVC_REG->SRC_WIDTH, _tvcContext.srcSize.width);
    OUTREG32(&TVC_REG->SRC_HEIGHT, _tvcContext.srcSize.height);

    // Config Line Pitch
    {
        TVC_REG_LINE_OFFSET OFFSET = TVC_REG->LINE_OFFSET;
        OFFSET.LINE_OFFSET = (TVC_YUV420_BLK == _tvcContext.srcFormat ||
                              TVC_YUV420_PLANAR == _tvcContext.srcFormat) ?
                             (_tvcContext.srcSize.width * 1) :
                             (_tvcContext.srcSize.width * 2);
        OUTREG32(&TVC_REG->LINE_OFFSET, AS_UINT32(&OFFSET));
    }




    //tar size
    tarSize.width = tar_width;
    tarSize.height = tar_height;

    _SetTarSize(tar_width, tar_height);
    _tvcContext.tarSize = tarSize;

    _SetResizCoeff(_tvcContext.srcSize, tarSize);

    _ConfigFullDisplayRegion();

    {
        TVC_REG_UPDATE update = TVC_REG->REG_UPDATE;
        update.REG_RDY = 1;
        OUTREG32(&TVC_REG->REG_UPDATE, AS_UINT32(&update));
    }


}
Ejemplo n.º 3
0
static TVC_STATUS _ConfigTarSize(void)
{
    _SIZE srcSize = _tvcContext.srcSize;
    _SIZE tarSize = {0};



#if FIXED_WVGA_PARAMS
    tarSize.width  = TV_OUTPUT_WIDTH;
    tarSize.height = TV_OUTPUT_HEIGHT;
#else
    tarSize.width  = 264;
    tarSize.height = 221;
#endif

    _SetTarSize(tarSize.width, tarSize.height);
    _tvcContext.tarSize = tarSize;

    _SetResizCoeff(srcSize, tarSize);

    return TVC_STATUS_OK;
}