Ejemplo n.º 1
0
PROGRESSIVE_CONTEXT* progressive_context_new(BOOL Compressor)
{
    PROGRESSIVE_CONTEXT* progressive;

    progressive = (PROGRESSIVE_CONTEXT*) calloc(1, sizeof(PROGRESSIVE_CONTEXT));

    if (progressive)
    {
        progressive->Compressor = Compressor;

        progressive->bufferPool = BufferPool_New(TRUE, (8192 + 32) * 3, 16);

        progressive->cRects = 64;
        progressive->rects = (RFX_RECT*) malloc(progressive->cRects * sizeof(RFX_RECT));

        if (!progressive->rects)
            return NULL;

        progressive->cTiles = 64;
        progressive->tiles = (RFX_PROGRESSIVE_TILE*) malloc(progressive->cTiles * sizeof(RFX_PROGRESSIVE_TILE));

        if (!progressive->tiles)
            return NULL;

        progressive->cQuant = 8;
        progressive->quantVals = (RFX_COMPONENT_CODEC_QUANT*) malloc(progressive->cQuant * sizeof(RFX_COMPONENT_CODEC_QUANT));

        if (!progressive->quantVals)
            return NULL;

        progressive->cProgQuant = 8;
        progressive->quantProgVals = (RFX_PROGRESSIVE_CODEC_QUANT*) malloc(progressive->cProgQuant * sizeof(RFX_PROGRESSIVE_CODEC_QUANT));

        if (!progressive->quantProgVals)
            return NULL;

        ZeroMemory(&(progressive->quantProgValFull), sizeof(RFX_PROGRESSIVE_CODEC_QUANT));
        progressive->quantProgValFull.quality = 100;

        progressive_context_reset(progressive);
    }

    return progressive;
}
Ejemplo n.º 2
0
BOOL freerdp_client_codecs_reset(rdpCodecs* codecs, UINT32 flags,
				 UINT32 width, UINT32 height)
{
	BOOL rc = TRUE;

	if (!freerdp_client_codecs_prepare(codecs, flags))
		return FALSE;

	if (flags & FREERDP_CODEC_INTERLEAVED)
	{
		if (codecs->interleaved)
		{
			rc &= bitmap_interleaved_context_reset(codecs->interleaved);
		}
	}

	if (flags & FREERDP_CODEC_PLANAR)
	{
		if (codecs->planar)
		{
			rc &= freerdp_bitmap_planar_context_reset(codecs->planar);
		}
	}

	if (flags & FREERDP_CODEC_NSCODEC)
	{
		if (codecs->nsc)
		{
			rc &= nsc_context_reset(codecs->nsc, width, height);
		}
	}

	if (flags & FREERDP_CODEC_REMOTEFX)
	{
		if (codecs->rfx)
		{
			rc &= rfx_context_reset(codecs->rfx, width, height);
		}
	}

	if (flags & FREERDP_CODEC_CLEARCODEC)
	{
		if (codecs->clear)
		{
			rc &= clear_context_reset(codecs->clear);
		}
	}

	if (flags & FREERDP_CODEC_ALPHACODEC)
	{

	}

	if (flags & FREERDP_CODEC_PROGRESSIVE)
	{
		if (codecs->progressive)
		{
			rc &= progressive_context_reset(codecs->progressive);
		}
	}

	if (flags & (FREERDP_CODEC_AVC420 | FREERDP_CODEC_AVC444))
	{
		if (codecs->h264)
		{
			rc &= h264_context_reset(codecs->h264, width, height);
		}
	}

	return rc;
}
Ejemplo n.º 3
0
BOOL freerdp_client_codecs_reset(rdpCodecs* codecs, UINT32 flags)
{
	if (flags & FREERDP_CODEC_INTERLEAVED)
	{
		if (codecs->interleaved)
		{
			bitmap_interleaved_context_reset(codecs->interleaved);
		}
	}

	if (flags & FREERDP_CODEC_PLANAR)
	{
		if (codecs->planar)
		{
			freerdp_bitmap_planar_context_reset(codecs->planar);
		}
	}

	if (flags & FREERDP_CODEC_NSCODEC)
	{
		if (codecs->nsc)
		{
			nsc_context_reset(codecs->nsc);
		}
	}

	if (flags & FREERDP_CODEC_REMOTEFX)
	{
		if (codecs->rfx)
		{
			rfx_context_reset(codecs->rfx);
		}
	}

	if (flags & FREERDP_CODEC_CLEARCODEC)
	{
		if (codecs->clear)
		{
			clear_context_reset(codecs->clear);
		}
	}

	if (flags & FREERDP_CODEC_ALPHACODEC)
	{

	}

	if (flags & FREERDP_CODEC_PROGRESSIVE)
	{
		if (codecs->progressive)
		{
			progressive_context_reset(codecs->progressive);
		}
	}

	if (flags & FREERDP_CODEC_H264)
	{
		if (codecs->h264)
		{
			h264_context_reset(codecs->h264);
		}
	}

	return TRUE;
}