channels/rdpgfx: update debug output
This commit is contained in:
parent
85a2caaace
commit
24ed6b06cc
@ -41,6 +41,8 @@
|
||||
|
||||
#include "rdpgfx_main.h"
|
||||
|
||||
#define TAG CHANNELS_TAG("rdpgfx.client")
|
||||
|
||||
int rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback)
|
||||
{
|
||||
int status;
|
||||
@ -85,7 +87,7 @@ int rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback)
|
||||
|
||||
header.pduLength = RDPGFX_HEADER_SIZE + 2 + (pdu.capsSetCount * RDPGFX_CAPSET_SIZE);
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "SendCapsAdvertisePdu");
|
||||
WLog_DBG(TAG, "SendCapsAdvertisePdu");
|
||||
|
||||
s = Stream_New(NULL, header.pduLength);
|
||||
|
||||
@ -130,7 +132,7 @@ int rdpgfx_recv_caps_confirm_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
|
||||
/*TODO: interpret this answer*/
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvCapsConfirmPdu: version: 0x%04X flags: 0x%04X",
|
||||
WLog_DBG(TAG, "RecvCapsConfirmPdu: version: 0x%04X flags: 0x%04X",
|
||||
capsSet.version, capsSet.flags);
|
||||
|
||||
return 1;
|
||||
@ -147,7 +149,7 @@ int rdpgfx_send_frame_acknowledge_pdu(RDPGFX_CHANNEL_CALLBACK* callback, RDPGFX_
|
||||
header.cmdId = RDPGFX_CMDID_FRAMEACKNOWLEDGE;
|
||||
header.pduLength = RDPGFX_HEADER_SIZE + 12;
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "SendFrameAcknowledgePdu: %d", pdu->frameId);
|
||||
WLog_DBG(TAG, "SendFrameAcknowledgePdu: %d", pdu->frameId);
|
||||
|
||||
s = Stream_New(NULL, header.pduLength);
|
||||
|
||||
@ -210,7 +212,7 @@ int rdpgfx_recv_reset_graphics_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s
|
||||
|
||||
Stream_Seek(s, pad); /* pad (total size is 340 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvResetGraphicsPdu: width: %d height: %d count: %d",
|
||||
WLog_DBG(TAG, "RecvResetGraphicsPdu: width: %d height: %d count: %d",
|
||||
pdu.width, pdu.height, pdu.monitorCount);
|
||||
|
||||
if (context && context->ResetGraphics)
|
||||
@ -234,7 +236,7 @@ int rdpgfx_recv_evict_cache_entry_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream
|
||||
|
||||
Stream_Read_UINT16(s, pdu.cacheSlot); /* cacheSlot (2 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvEvictCacheEntryPdu: cacheSlot: %d", pdu.cacheSlot);
|
||||
WLog_DBG(TAG, "RecvEvictCacheEntryPdu: cacheSlot: %d", pdu.cacheSlot);
|
||||
|
||||
if (context && context->EvictCacheEntry)
|
||||
{
|
||||
@ -269,7 +271,7 @@ int rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea
|
||||
Stream_Read_UINT16(s, pdu.cacheSlots[index]); /* cacheSlot (2 bytes) */
|
||||
}
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvCacheImportReplyPdu: importedEntriesCount: %d",
|
||||
WLog_DBG(TAG, "RecvCacheImportReplyPdu: importedEntriesCount: %d",
|
||||
pdu.importedEntriesCount);
|
||||
|
||||
if (context && context->CacheImportReply)
|
||||
@ -296,7 +298,7 @@ int rdpgfx_recv_create_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s
|
||||
Stream_Read_UINT16(s, pdu.height); /* height (2 bytes) */
|
||||
Stream_Read_UINT8(s, pdu.pixelFormat); /* RDPGFX_PIXELFORMAT (1 byte) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvCreateSurfacePdu: surfaceId: %d width: %d height: %d pixelFormat: 0x%02X",
|
||||
WLog_DBG(TAG, "RecvCreateSurfacePdu: surfaceId: %d width: %d height: %d pixelFormat: 0x%02X",
|
||||
pdu.surfaceId, pdu.width, pdu.height, pdu.pixelFormat);
|
||||
|
||||
if (context && context->CreateSurface)
|
||||
@ -318,7 +320,7 @@ int rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s
|
||||
|
||||
Stream_Read_UINT16(s, pdu.surfaceId); /* surfaceId (2 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvDeleteSurfacePdu: surfaceId: %d", pdu.surfaceId);
|
||||
WLog_DBG(TAG, "RecvDeleteSurfacePdu: surfaceId: %d", pdu.surfaceId);
|
||||
|
||||
if (context && context->DeleteSurface)
|
||||
{
|
||||
@ -340,7 +342,7 @@ int rdpgfx_recv_start_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
Stream_Read_UINT32(s, pdu.timestamp); /* timestamp (4 bytes) */
|
||||
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvStartFramePdu: frameId: %d timestamp: 0x%04X",
|
||||
WLog_DBG(TAG, "RecvStartFramePdu: frameId: %d timestamp: 0x%04X",
|
||||
pdu.frameId, pdu.timestamp);
|
||||
|
||||
if (context && context->StartFrame)
|
||||
@ -365,7 +367,7 @@ int rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
|
||||
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvEndFramePdu: frameId: %d", pdu.frameId);
|
||||
WLog_DBG(TAG, "RecvEndFramePdu: frameId: %d", pdu.frameId);
|
||||
|
||||
if (context && context->EndFrame)
|
||||
{
|
||||
@ -410,7 +412,7 @@ int rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream
|
||||
pdu.bitmapData = Stream_Pointer(s);
|
||||
Stream_Seek(s, pdu.bitmapDataLength);
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvWireToSurface1Pdu: surfaceId: %d codecId: %s (0x%04X) pixelFormat: 0x%04X "
|
||||
WLog_DBG(TAG, "RecvWireToSurface1Pdu: surfaceId: %d codecId: %s (0x%04X) pixelFormat: 0x%04X "
|
||||
"destRect: left: %d top: %d right: %d bottom: %d bitmapDataLength: %d",
|
||||
(int) pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId), pdu.codecId, pdu.pixelFormat,
|
||||
pdu.destRect.left, pdu.destRect.top, pdu.destRect.right, pdu.destRect.bottom,
|
||||
@ -464,9 +466,10 @@ int rdpgfx_recv_wire_to_surface_2_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream
|
||||
pdu.bitmapData = Stream_Pointer(s);
|
||||
Stream_Seek(s, pdu.bitmapDataLength);
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvWireToSurface2Pdu: surfaceId: %d codecId: 0x%04X "
|
||||
WLog_DBG(TAG, "RecvWireToSurface2Pdu: surfaceId: %d codecId: %s (0x%04X) "
|
||||
"codecContextId: %d pixelFormat: 0x%04X bitmapDataLength: %d",
|
||||
(int) pdu.surfaceId, pdu.codecId, pdu.codecContextId, pdu.pixelFormat, pdu.bitmapDataLength);
|
||||
(int) pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId), pdu.codecId,
|
||||
pdu.codecContextId, pdu.pixelFormat, pdu.bitmapDataLength);
|
||||
|
||||
cmd.surfaceId = pdu.surfaceId;
|
||||
cmd.codecId = pdu.codecId;
|
||||
@ -501,7 +504,7 @@ int rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK* callback, w
|
||||
Stream_Read_UINT16(s, pdu.surfaceId); /* surfaceId (2 bytes) */
|
||||
Stream_Read_UINT32(s, pdu.codecContextId); /* codecContextId (4 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvDeleteEncodingContextPdu: surfaceId: %d codecContextId: %d",
|
||||
WLog_DBG(TAG, "RecvDeleteEncodingContextPdu: surfaceId: %d codecContextId: %d",
|
||||
pdu.surfaceId, pdu.codecContextId);
|
||||
|
||||
if (context && context->DeleteEncodingContext)
|
||||
@ -541,7 +544,7 @@ int rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
rdpgfx_read_rect16(s, fillRect);
|
||||
}
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvSolidFillPdu: surfaceId: %d fillRectCount: %d",
|
||||
WLog_DBG(TAG, "RecvSolidFillPdu: surfaceId: %d fillRectCount: %d",
|
||||
pdu.surfaceId, pdu.fillRectCount);
|
||||
|
||||
if (context && context->SolidFill)
|
||||
@ -584,7 +587,7 @@ int rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea
|
||||
rdpgfx_read_point16(s, destPt);
|
||||
}
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvSurfaceToSurfacePdu: surfaceIdSrc: %d surfaceIdDest: %d "
|
||||
WLog_DBG(TAG, "RecvSurfaceToSurfacePdu: surfaceIdSrc: %d surfaceIdDest: %d "
|
||||
"left: %d top: %d right: %d bottom: %d destPtsCount: %d",
|
||||
pdu.surfaceIdSrc, pdu.surfaceIdDest,
|
||||
pdu.rectSrc.left, pdu.rectSrc.top, pdu.rectSrc.right, pdu.rectSrc.bottom,
|
||||
@ -614,7 +617,7 @@ int rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream*
|
||||
Stream_Read_UINT16(s, pdu.cacheSlot); /* cacheSlot (2 bytes) */
|
||||
rdpgfx_read_rect16(s, &(pdu.rectSrc)); /* rectSrc (8 bytes ) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvSurfaceToCachePdu: surfaceId: %d cacheKey: 0x%08X cacheSlot: %d "
|
||||
WLog_DBG(TAG, "RecvSurfaceToCachePdu: surfaceId: %d cacheKey: 0x%08X cacheSlot: %d "
|
||||
"left: %d top: %d right: %d bottom: %d",
|
||||
pdu.surfaceId, (int) pdu.cacheKey, pdu.cacheSlot,
|
||||
pdu.rectSrc.left, pdu.rectSrc.top,
|
||||
@ -657,7 +660,7 @@ int rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream*
|
||||
rdpgfx_read_point16(s, destPt);
|
||||
}
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RdpGfxRecvCacheToSurfacePdu: cacheSlot: %d surfaceId: %d destPtsCount: %d",
|
||||
WLog_DBG(TAG, "RdpGfxRecvCacheToSurfacePdu: cacheSlot: %d surfaceId: %d destPtsCount: %d",
|
||||
pdu.cacheSlot, (int) pdu.surfaceId, pdu.destPtsCount);
|
||||
|
||||
if (context && context->CacheToSurface)
|
||||
@ -684,7 +687,7 @@ int rdpgfx_recv_map_surface_to_output_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wSt
|
||||
Stream_Read_UINT32(s, pdu.outputOriginX); /* outputOriginX (4 bytes) */
|
||||
Stream_Read_UINT32(s, pdu.outputOriginY); /* outputOriginY (4 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvMapSurfaceToOutputPdu: surfaceId: %d outputOriginX: %d outputOriginY: %d",
|
||||
WLog_DBG(TAG, "RecvMapSurfaceToOutputPdu: surfaceId: %d outputOriginX: %d outputOriginY: %d",
|
||||
(int) pdu.surfaceId, pdu.outputOriginX, pdu.outputOriginY);
|
||||
|
||||
if (context && context->MapSurfaceToOutput)
|
||||
@ -709,7 +712,7 @@ int rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wSt
|
||||
Stream_Read_UINT32(s, pdu.mappedWidth); /* mappedWidth (4 bytes) */
|
||||
Stream_Read_UINT32(s, pdu.mappedHeight); /* mappedHeight (4 bytes) */
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "RecvMapSurfaceToWindowPdu: surfaceId: %d windowId: 0x%04X mappedWidth: %d mappedHeight: %d",
|
||||
WLog_DBG(TAG, "RecvMapSurfaceToWindowPdu: surfaceId: %d windowId: 0x%04X mappedWidth: %d mappedHeight: %d",
|
||||
pdu.surfaceId, (int) pdu.windowId, pdu.mappedWidth, pdu.mappedHeight);
|
||||
|
||||
if (context && context->MapSurfaceToWindow)
|
||||
@ -735,7 +738,7 @@ int rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
return -1;
|
||||
|
||||
#if 1
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "cmdId: %s (0x%04X) flags: 0x%04X pduLength: %d",
|
||||
WLog_DBG(TAG, "cmdId: %s (0x%04X) flags: 0x%04X pduLength: %d",
|
||||
rdpgfx_get_cmd_id_string(header.cmdId), header.cmdId, header.flags, header.pduLength);
|
||||
#endif
|
||||
|
||||
@ -861,9 +864,6 @@ static int rdpgfx_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
|
||||
}
|
||||
|
||||
Stream_Free(s, TRUE);
|
||||
|
||||
//free(Stream_Buffer(data));
|
||||
//Stream_Free(data,TRUE);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -873,7 +873,7 @@ static int rdpgfx_on_open(IWTSVirtualChannelCallback* pChannelCallback)
|
||||
RDPGFX_CHANNEL_CALLBACK* callback = (RDPGFX_CHANNEL_CALLBACK*) pChannelCallback;
|
||||
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "OnOpen");
|
||||
WLog_DBG(TAG, "OnOpen");
|
||||
|
||||
rdpgfx_send_caps_advertise_pdu(callback);
|
||||
|
||||
@ -885,7 +885,7 @@ static int rdpgfx_on_close(IWTSVirtualChannelCallback* pChannelCallback)
|
||||
RDPGFX_CHANNEL_CALLBACK* callback = (RDPGFX_CHANNEL_CALLBACK*) pChannelCallback;
|
||||
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "OnClose");
|
||||
WLog_DBG(TAG, "OnClose");
|
||||
|
||||
free(callback);
|
||||
|
||||
@ -936,7 +936,7 @@ static int rdpgfx_plugin_initialize(IWTSPlugin* pPlugin, IWTSVirtualChannelManag
|
||||
|
||||
gfx->listener->pInterface = gfx->iface.pInterface;
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "Initialize");
|
||||
WLog_DBG(TAG, "Initialize");
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -949,7 +949,7 @@ static int rdpgfx_plugin_terminated(IWTSPlugin* pPlugin)
|
||||
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) pPlugin;
|
||||
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
|
||||
|
||||
WLog_Print(gfx->log, WLOG_DEBUG, "Terminated");
|
||||
WLog_DBG(TAG, "Terminated");
|
||||
|
||||
if (gfx->listener_callback)
|
||||
{
|
||||
@ -1106,7 +1106,6 @@ int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
|
||||
if (!gfx)
|
||||
return -1;
|
||||
|
||||
gfx->log = WLog_Get(TAG);
|
||||
gfx->settings = (rdpSettings*) pEntryPoints->GetRdpSettings(pEntryPoints);
|
||||
|
||||
gfx->iface.Initialize = rdpgfx_plugin_initialize;
|
||||
@ -1115,6 +1114,7 @@ int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
|
||||
gfx->iface.Terminated = rdpgfx_plugin_terminated;
|
||||
|
||||
gfx->SurfaceTable = HashTable_New(TRUE);
|
||||
|
||||
if (!gfx->SurfaceTable)
|
||||
{
|
||||
free (gfx);
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include <freerdp/channels/log.h>
|
||||
#include <freerdp/codec/zgfx.h>
|
||||
|
||||
#define TAG CHANNELS_TAG("rdpgfx.client")
|
||||
|
||||
struct _RDPGFX_CHANNEL_CALLBACK
|
||||
{
|
||||
IWTSVirtualChannelCallback iface;
|
||||
@ -60,7 +58,6 @@ struct _RDPGFX_PLUGIN
|
||||
IWTSListener* listener;
|
||||
RDPGFX_LISTENER_CALLBACK* listener_callback;
|
||||
|
||||
wLog* log;
|
||||
rdpSettings* settings;
|
||||
|
||||
BOOL ThinClient;
|
||||
|
@ -46,10 +46,6 @@ typedef struct _PROGRESSIVE_CONTEXT PROGRESSIVE_CONTEXT;
|
||||
#define PROGRESSIVE_WBT_TILE_FIRST 0xCCC6
|
||||
#define PROGRESSIVE_WBT_TILE_UPGRADE 0xCCC7
|
||||
|
||||
#define PROGRESSIVE_BLOCKS_ALL 0x0001
|
||||
#define PROGRESSIVE_BLOCKS_REGION 0x0002
|
||||
#define PROGRESSIVE_BLOCKS_TILE 0x0004
|
||||
|
||||
struct _RFX_COMPONENT_CODEC_QUANT
|
||||
{
|
||||
BYTE LL3;
|
||||
@ -102,77 +98,6 @@ struct _PROGRESSIVE_BLOCK_CONTEXT
|
||||
};
|
||||
typedef struct _PROGRESSIVE_BLOCK_CONTEXT PROGRESSIVE_BLOCK_CONTEXT;
|
||||
|
||||
struct _PROGRESSIVE_BLOCK_TILE_SIMPLE
|
||||
{
|
||||
UINT16 blockType;
|
||||
UINT32 blockLen;
|
||||
|
||||
BYTE quantIdxY;
|
||||
BYTE quantIdxCb;
|
||||
BYTE quantIdxCr;
|
||||
UINT16 xIdx;
|
||||
UINT16 yIdx;
|
||||
BYTE flags;
|
||||
UINT16 yLen;
|
||||
UINT16 cbLen;
|
||||
UINT16 crLen;
|
||||
UINT16 tailLen;
|
||||
BYTE* yData;
|
||||
BYTE* cbData;
|
||||
BYTE* crData;
|
||||
BYTE* tailData;
|
||||
};
|
||||
typedef struct _PROGRESSIVE_BLOCK_TILE_SIMPLE PROGRESSIVE_BLOCK_TILE_SIMPLE;
|
||||
|
||||
struct _PROGRESSIVE_BLOCK_TILE_FIRST
|
||||
{
|
||||
UINT16 blockType;
|
||||
UINT32 blockLen;
|
||||
|
||||
BYTE quantIdxY;
|
||||
BYTE quantIdxCb;
|
||||
BYTE quantIdxCr;
|
||||
UINT16 xIdx;
|
||||
UINT16 yIdx;
|
||||
BYTE flags;
|
||||
BYTE quality;
|
||||
UINT16 yLen;
|
||||
UINT16 cbLen;
|
||||
UINT16 crLen;
|
||||
UINT16 tailLen;
|
||||
BYTE* yData;
|
||||
BYTE* cbData;
|
||||
BYTE* crData;
|
||||
BYTE* tailData;
|
||||
};
|
||||
typedef struct _PROGRESSIVE_BLOCK_TILE_FIRST PROGRESSIVE_BLOCK_TILE_FIRST;
|
||||
|
||||
struct _PROGRESSIVE_BLOCK_TILE_UPGRADE
|
||||
{
|
||||
UINT16 blockType;
|
||||
UINT32 blockLen;
|
||||
|
||||
BYTE quantIdxY;
|
||||
BYTE quantIdxCb;
|
||||
BYTE quantIdxCr;
|
||||
UINT16 xIdx;
|
||||
UINT16 yIdx;
|
||||
BYTE quality;
|
||||
UINT16 ySrlLen;
|
||||
UINT16 yRawLen;
|
||||
UINT16 cbSrlLen;
|
||||
UINT16 cbRawLen;
|
||||
UINT16 crSrlLen;
|
||||
UINT16 crRawLen;
|
||||
BYTE* ySrlData;
|
||||
BYTE* yRawData;
|
||||
BYTE* cbSrlData;
|
||||
BYTE* cbRawData;
|
||||
BYTE* crSrlData;
|
||||
BYTE* crRawData;
|
||||
};
|
||||
typedef struct _PROGRESSIVE_BLOCK_TILE_UPGRADE PROGRESSIVE_BLOCK_TILE_UPGRADE;
|
||||
|
||||
struct _RFX_PROGRESSIVE_TILE
|
||||
{
|
||||
UINT16 blockType;
|
||||
@ -285,7 +210,6 @@ struct _PROGRESSIVE_CONTEXT
|
||||
|
||||
BOOL invert;
|
||||
|
||||
wLog* log;
|
||||
wBufferPool* bufferPool;
|
||||
|
||||
UINT32 cRects;
|
||||
|
@ -224,6 +224,12 @@ BOOL progressive_rfx_quant_cmp_equal(RFX_COMPONENT_CODEC_QUANT* q1, RFX_COMPONEN
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void progressive_rfx_quant_print(RFX_COMPONENT_CODEC_QUANT* q, const char* name)
|
||||
{
|
||||
fprintf(stderr, "%s: HL1: %d LH1: %d HH1: %d HL2: %d LH2: %d HH2: %d HL3: %d LH3: %d HH3: %d LL3: %d\n",
|
||||
name, q->HL1, q->LH1, q->HH1, q->HL2, q->LH2, q->HH2, q->HL3, q->LH3, q->HH3, q->LL3);
|
||||
}
|
||||
|
||||
int progressive_set_surface_data(PROGRESSIVE_CONTEXT* progressive, UINT16 surfaceId, void* pData)
|
||||
{
|
||||
ULONG_PTR key;
|
||||
@ -727,10 +733,9 @@ int progressive_decompress_tile_first(PROGRESSIVE_CONTEXT* progressive, RFX_PROG
|
||||
|
||||
diff = tile->flags & RFX_TILE_DIFFERENCE;
|
||||
|
||||
#if 0
|
||||
WLog_INFO(TAG, "ProgressiveTileFirst: quantIdx Y: %d Cb: %d Cr: %d xIdx: %d yIdx: %d flags: 0x%02X quality: %d yLen: %d cbLen: %d crLen: %d tailLen: %d",
|
||||
tile->quantIdxY, tile->quantIdxCb, tile->quantIdxCr, tile->xIdx, tile->yIdx, tile->flags, tile->quality, tile->yLen, tile->cbLen, tile->crLen, tile->tailLen);
|
||||
#endif
|
||||
WLog_DBG(TAG, "ProgressiveTile%s: quantIdx Y: %d Cb: %d Cr: %d xIdx: %d yIdx: %d flags: 0x%02X quality: %d yLen: %d cbLen: %d crLen: %d tailLen: %d",
|
||||
(tile->blockType == PROGRESSIVE_WBT_TILE_FIRST) ? "First" : "Simple",
|
||||
tile->quantIdxY, tile->quantIdxCb, tile->quantIdxCr, tile->xIdx, tile->yIdx, tile->flags, tile->quality, tile->yLen, tile->cbLen, tile->crLen, tile->tailLen);
|
||||
|
||||
region = &(progressive->region);
|
||||
|
||||
@ -825,8 +830,6 @@ int progressive_decompress_tile_first(PROGRESSIVE_CONTEXT* progressive, RFX_PROG
|
||||
|
||||
BufferPool_Return(progressive->bufferPool, pBuffer);
|
||||
|
||||
//WLog_Image(progressive->log, WLOG_TRACE, tile->data, 64, 64, 32);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1134,10 +1137,8 @@ int progressive_decompress_tile_upgrade(PROGRESSIVE_CONTEXT* progressive, RFX_PR
|
||||
|
||||
tile->pass++;
|
||||
|
||||
#if 0
|
||||
WLog_INFO(TAG, "ProgressiveTileUpgrade: pass: %d quantIdx Y: %d Cb: %d Cr: %d xIdx: %d yIdx: %d quality: %d ySrlLen: %d yRawLen: %d cbSrlLen: %d cbRawLen: %d crSrlLen: %d crRawLen: %d",
|
||||
WLog_DBG(TAG, "ProgressiveTileUpgrade: pass: %d quantIdx Y: %d Cb: %d Cr: %d xIdx: %d yIdx: %d quality: %d ySrlLen: %d yRawLen: %d cbSrlLen: %d cbRawLen: %d crSrlLen: %d crRawLen: %d",
|
||||
tile->pass, tile->quantIdxY, tile->quantIdxCb, tile->quantIdxCr, tile->xIdx, tile->yIdx, tile->quality, tile->ySrlLen, tile->yRawLen, tile->cbSrlLen, tile->cbRawLen, tile->crSrlLen, tile->crRawLen);
|
||||
#endif
|
||||
|
||||
region = &(progressive->region);
|
||||
|
||||
@ -1246,8 +1247,6 @@ int progressive_decompress_tile_upgrade(PROGRESSIVE_CONTEXT* progressive, RFX_PR
|
||||
|
||||
BufferPool_Return(progressive->bufferPool, pBuffer);
|
||||
|
||||
//WLog_Image(progressive->log, WLOG_TRACE, tile->data, 64, 64, 32);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1281,7 +1280,7 @@ int progressive_process_tiles(PROGRESSIVE_CONTEXT* progressive, BYTE* blocks, UI
|
||||
blockLen = *((UINT32*) &block[boffset + 2]); /* blockLen (4 bytes) */
|
||||
boffset += 6;
|
||||
|
||||
//WLog_INFO(TAG, "%s", progressive_get_block_type_string(blockType));
|
||||
//WLog_DBG(TAG, "%s", progressive_get_block_type_string(blockType));
|
||||
|
||||
if ((blocksLen - offset) < blockLen)
|
||||
return -1003;
|
||||
@ -1507,6 +1506,11 @@ int progressive_process_tiles(PROGRESSIVE_CONTEXT* progressive, BYTE* blocks, UI
|
||||
if (offset != blocksLen)
|
||||
return -1041;
|
||||
|
||||
if (count != region->numTiles)
|
||||
{
|
||||
WLog_WARN(TAG, "numTiles inconsistency: actual: %d, expected: %d\n", count, region->numTiles);
|
||||
}
|
||||
|
||||
for (index = 0; index < region->numTiles; index++)
|
||||
{
|
||||
tile = tiles[index];
|
||||
@ -1573,7 +1577,6 @@ int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UIN
|
||||
blockType = *((UINT16*) &block[boffset + 0]); /* blockType (2 bytes) */
|
||||
blockLen = *((UINT32*) &block[boffset + 2]); /* blockLen (4 bytes) */
|
||||
boffset += 6;
|
||||
//WLog_INFO(TAG, "%s", progressive_get_block_type_string(blockType));
|
||||
|
||||
if ((blocksLen - offset) < blockLen)
|
||||
return -1003;
|
||||
@ -1582,6 +1585,8 @@ int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UIN
|
||||
{
|
||||
case PROGRESSIVE_WBT_SYNC:
|
||||
|
||||
WLog_DBG(TAG, "ProgressiveSync");
|
||||
|
||||
sync.blockType = blockType;
|
||||
sync.blockLen = blockLen;
|
||||
|
||||
@ -1612,6 +1617,9 @@ int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UIN
|
||||
frameBegin.regionCount = (UINT32) *((UINT16*) &block[boffset + 4]); /* regionCount (2 bytes) */
|
||||
boffset += 6;
|
||||
|
||||
WLog_DBG(TAG, "ProgressiveFrameBegin: frameIndex: %d regionCount: %d",
|
||||
frameBegin.frameIndex, frameBegin.regionCount);
|
||||
|
||||
/**
|
||||
* If the number of elements specified by the regionCount field is
|
||||
* larger than the actual number of elements in the regions field,
|
||||
@ -1622,6 +1630,8 @@ int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UIN
|
||||
|
||||
case PROGRESSIVE_WBT_FRAME_END:
|
||||
|
||||
WLog_DBG(TAG, "ProgressiveFrameEnd");
|
||||
|
||||
frameEnd.blockType = blockType;
|
||||
frameEnd.blockLen = blockLen;
|
||||
|
||||
@ -1646,6 +1656,13 @@ int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UIN
|
||||
if (context.tileSize != 64)
|
||||
return -1010;
|
||||
|
||||
WLog_DBG(TAG, "ProgressiveContext: flags: 0x%02X", context.flags);
|
||||
|
||||
if (!(context.flags & RFX_SUBBAND_DIFFING))
|
||||
{
|
||||
WLog_WARN(TAG, "RFX_SUBBAND_DIFFING is not set");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case PROGRESSIVE_WBT_REGION:
|
||||
@ -1767,8 +1784,20 @@ int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UIN
|
||||
if (!region->tiles)
|
||||
return -1;
|
||||
|
||||
//WLog_INFO(TAG, "numRects: %d numTiles: %d numQuant: %d numProgQuant: %d",
|
||||
// region->numRects, region->numTiles, region->numQuant, region->numProgQuant);
|
||||
WLog_DBG(TAG, "ProgressiveRegion: numRects: %d numTiles: %d tileDataSize: %d flags: 0x%02X numQuant: %d numProgQuant: %d",
|
||||
region->numRects, region->numTiles, region->tileDataSize, region->flags, region->numQuant, region->numProgQuant);
|
||||
|
||||
if (!(region->flags & RFX_DWT_REDUCE_EXTRAPOLATE))
|
||||
{
|
||||
WLog_WARN(TAG, "RFX_DWT_REDUCE_EXTRAPOLATE is not set");
|
||||
}
|
||||
|
||||
for (index = 0; index < region->numRects; index++)
|
||||
{
|
||||
rect = &(region->rects[index]);
|
||||
WLog_DBG(TAG, "rect[%d]: x: %d y: %d w: %d h: %d",
|
||||
index, rect->x, rect->y, rect->width, rect->height);
|
||||
}
|
||||
|
||||
status = progressive_process_tiles(progressive, &block[boffset], region->tileDataSize, surface);
|
||||
|
||||
@ -1817,8 +1846,6 @@ PROGRESSIVE_CONTEXT* progressive_context_new(BOOL Compressor)
|
||||
{
|
||||
progressive->Compressor = Compressor;
|
||||
|
||||
progressive->log = WLog_Get(TAG);
|
||||
|
||||
progressive->bufferPool = BufferPool_New(TRUE, (8192 + 32) * 3, 16);
|
||||
|
||||
progressive->cRects = 64;
|
||||
|
Loading…
Reference in New Issue
Block a user