1430ce5c32361119ed81a62c918be6afbdd053eddhding/* 2430ce5c32361119ed81a62c918be6afbdd053eddhding* Copyright (c) 2011 Intel Corporation. All Rights Reserved. 3430ce5c32361119ed81a62c918be6afbdd053eddhding* Copyright (c) Imagination Technologies Limited, UK 4430ce5c32361119ed81a62c918be6afbdd053eddhding* 5430ce5c32361119ed81a62c918be6afbdd053eddhding* Permission is hereby granted, free of charge, to any person obtaining a 6430ce5c32361119ed81a62c918be6afbdd053eddhding* copy of this software and associated documentation files (the 7430ce5c32361119ed81a62c918be6afbdd053eddhding* "Software"), to deal in the Software without restriction, including 8430ce5c32361119ed81a62c918be6afbdd053eddhding* without limitation the rights to use, copy, modify, merge, publish, 9430ce5c32361119ed81a62c918be6afbdd053eddhding* distribute, sub license, and/or sell copies of the Software, and to 10430ce5c32361119ed81a62c918be6afbdd053eddhding* permit persons to whom the Software is furnished to do so, subject to 11430ce5c32361119ed81a62c918be6afbdd053eddhding* the following conditions: 12430ce5c32361119ed81a62c918be6afbdd053eddhding* 13430ce5c32361119ed81a62c918be6afbdd053eddhding* The above copyright notice and this permission notice (including the 14430ce5c32361119ed81a62c918be6afbdd053eddhding* next paragraph) shall be included in all copies or substantial portions 15430ce5c32361119ed81a62c918be6afbdd053eddhding* of the Software. 16430ce5c32361119ed81a62c918be6afbdd053eddhding* 17430ce5c32361119ed81a62c918be6afbdd053eddhding* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18430ce5c32361119ed81a62c918be6afbdd053eddhding* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19430ce5c32361119ed81a62c918be6afbdd053eddhding* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 20430ce5c32361119ed81a62c918be6afbdd053eddhding* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 21430ce5c32361119ed81a62c918be6afbdd053eddhding* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22430ce5c32361119ed81a62c918be6afbdd053eddhding* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23430ce5c32361119ed81a62c918be6afbdd053eddhding* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24430ce5c32361119ed81a62c918be6afbdd053eddhding* 25430ce5c32361119ed81a62c918be6afbdd053eddhding*/ 26dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 27dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include <errno.h> 28dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include <stdlib.h> 298e9a21e730449c10cac6e6f69d255611c93f63c2hding#include <unistd.h> 30dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include <stdint.h> 31dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include <string.h> 32dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include <limits.h> 33dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 34e26d82700f9514cc175d2b54733ebdeb8824922ehding#include "psb_drv_debug.h" 35dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include "tng_hostdefs.h" 36430ce5c32361119ed81a62c918be6afbdd053eddhding#include "tng_hostheader.h" 37430ce5c32361119ed81a62c918be6afbdd053eddhding#include "tng_picmgmt.h" 38430ce5c32361119ed81a62c918be6afbdd053eddhding#include "tng_jpegES.h" 39430ce5c32361119ed81a62c918be6afbdd053eddhding#include "tng_trace.h" 408e9a21e730449c10cac6e6f69d255611c93f63c2hding 41dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include "hwdefs/topazhp_core_regs.h" 42dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include "hwdefs/topazhp_multicore_regs_old.h" 43dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include "hwdefs/topaz_db_regs.h" 44dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include "hwdefs/topaz_vlc_regs.h" 45dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include "hwdefs/mvea_regs.h" 46dd0a0b792078d587a2e266f146ccd287c39a742dedward lin#include "hwdefs/topazhp_default_params.h" 47dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 485533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanunsigned int dump_address_content = 1; 49dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 508e9a21e730449c10cac6e6f69d255611c93f63c2hding#define PRINT_ARRAY_NEW( FEILD, NUM) \ 518e9a21e730449c10cac6e6f69d255611c93f63c2hding for(i=0;i< NUM;i++) { \ 528e9a21e730449c10cac6e6f69d255611c93f63c2hding if(i%6==0) \ 53e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t"); \ 54e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t0x%x", data->FEILD[i]); } \ 55e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t}\n"); 568e9a21e730449c10cac6e6f69d255611c93f63c2hding 578e9a21e730449c10cac6e6f69d255611c93f63c2hding#define PRINT_ARRAY_INT( FEILD, NUM) \ 588e9a21e730449c10cac6e6f69d255611c93f63c2hdingdo { \ 598e9a21e730449c10cac6e6f69d255611c93f63c2hding int tmp; \ 608e9a21e730449c10cac6e6f69d255611c93f63c2hding \ 618e9a21e730449c10cac6e6f69d255611c93f63c2hding for(tmp=0;tmp< NUM;tmp++) { \ 628e9a21e730449c10cac6e6f69d255611c93f63c2hding if(tmp%6==0) \ 63e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t"); \ 64e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t0x%08x", FEILD[tmp]); \ 658e9a21e730449c10cac6e6f69d255611c93f63c2hding } \ 66e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t}\n"); \ 678e9a21e730449c10cac6e6f69d255611c93f63c2hding} while (0) 688e9a21e730449c10cac6e6f69d255611c93f63c2hding 698e9a21e730449c10cac6e6f69d255611c93f63c2hding 708e9a21e730449c10cac6e6f69d255611c93f63c2hding#define PRINT_ARRAY_BYTE( FEILD, NUM) \ 718e9a21e730449c10cac6e6f69d255611c93f63c2hdingdo { \ 728e9a21e730449c10cac6e6f69d255611c93f63c2hding int tmp; \ 738e9a21e730449c10cac6e6f69d255611c93f63c2hding \ 748e9a21e730449c10cac6e6f69d255611c93f63c2hding for(tmp=0;tmp< NUM;tmp++) { \ 758e9a21e730449c10cac6e6f69d255611c93f63c2hding if(tmp%8==0) \ 76e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t"); \ 77e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t0x%02x", FEILD[tmp]); \ 788e9a21e730449c10cac6e6f69d255611c93f63c2hding } \ 79e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t}\n"); \ 808e9a21e730449c10cac6e6f69d255611c93f63c2hding} while (0) 818e9a21e730449c10cac6e6f69d255611c93f63c2hding 828e9a21e730449c10cac6e6f69d255611c93f63c2hding 838e9a21e730449c10cac6e6f69d255611c93f63c2hding/* 848e9a21e730449c10cac6e6f69d255611c93f63c2hding#define PRINT_ARRAY( FEILD, NUM) \ 858e9a21e730449c10cac6e6f69d255611c93f63c2hding for(i=0;i< NUM;i++) \ 86e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t0x%x", data->FEILD[i]); \ 87e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t}\n"); 888e9a21e730449c10cac6e6f69d255611c93f63c2hding*/ 898e9a21e730449c10cac6e6f69d255611c93f63c2hding 908e9a21e730449c10cac6e6f69d255611c93f63c2hding#define PRINT_ARRAY( FEILD, NUM) PRINT_ARRAY_NEW(FEILD, NUM) 918e9a21e730449c10cac6e6f69d255611c93f63c2hding 928e9a21e730449c10cac6e6f69d255611c93f63c2hding#define PRINT_ARRAY_ADDR(STR, FEILD, NUM) \ 938e9a21e730449c10cac6e6f69d255611c93f63c2hdingdo { \ 948e9a21e730449c10cac6e6f69d255611c93f63c2hding int i = 0; \ 95dd0a0b792078d587a2e266f146ccd287c39a742dedward lin unsigned char *virt; \ 96dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n"); \ 978e9a21e730449c10cac6e6f69d255611c93f63c2hding for (i=0;i< NUM;i++) { \ 98dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t%s[%02d]=x%08x\n", STR, i, data->FEILD[i]); \ 998e9a21e730449c10cac6e6f69d255611c93f63c2hding } \ 1008e9a21e730449c10cac6e6f69d255611c93f63c2hding} while (0) 1018e9a21e730449c10cac6e6f69d255611c93f63c2hding 1025533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int MTX_HEADER_PARAMS_dump(MTX_HEADER_PARAMS *p); 1035533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1045533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int DO_HEADER_dump(MTX_HEADER_PARAMS *data) 1055533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 1065533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan MTX_HEADER_PARAMS *p = data; 1075533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan unsigned char *q=(unsigned char *)data; 1085533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1095533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t(===RawBits===)"); 1105533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(q, 128); 1115533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1125533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan MTX_HEADER_PARAMS_dump(p); 1135533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1145533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\n"); 1155533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1165533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 1175533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 1185533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1198e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic void JPEG_MTX_DMA_dump(JPEG_MTX_DMA_SETUP *data) 1208e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 1218e9a21e730449c10cac6e6f69d255611c93f63c2hding int i; 122e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ComponentPlane{\n"); 1238e9a21e730449c10cac6e6f69d255611c93f63c2hding for(i=0;i<MTX_MAX_COMPONENTS ;i++) 1248e9a21e730449c10cac6e6f69d255611c93f63c2hding { 125e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\t ui32PhysAddr=%d\n",data->ComponentPlane[i].ui32PhysAddr); 126e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32Stride=%d",data->ComponentPlane[i].ui32Stride); 127e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32Height=%d\n",data->ComponentPlane[i].ui32Height); 1288e9a21e730449c10cac6e6f69d255611c93f63c2hding } 129e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t }\n"); 130e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t MCUComponent{\n"); 1318e9a21e730449c10cac6e6f69d255611c93f63c2hding for(i=0;i<MTX_MAX_COMPONENTS ;i++) 1328e9a21e730449c10cac6e6f69d255611c93f63c2hding { 133e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\t ui32WidthBlocks=%d",data->MCUComponent[i].ui32WidthBlocks); 134e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32HeightBlocks=%d",data->MCUComponent[i].ui32HeightBlocks); 135e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32XLimit=%d\n",data->MCUComponent[i].ui32XLimit); 136e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32YLimit=%d\n",data->MCUComponent[i].ui32YLimit); 1378e9a21e730449c10cac6e6f69d255611c93f63c2hding } 138e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t }\n"); 139e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui32ComponentsInScan =%d\n", data->ui32ComponentsInScan); 140e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui32TableA =%d\n", data->ui32TableA); 141e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16DataInterleaveStatus =%d\n", data->ui16DataInterleaveStatus); 142e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16MaxPipes =%d\n", data->ui16MaxPipes); 14388d0460822f8807666406c14662591167eed73a0hding //drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t apWritebackRegions {"); 14488d0460822f8807666406c14662591167eed73a0hding //PRINT_ARRAY( apWritebackRegions, WB_FIFO_SIZE); 1458e9a21e730449c10cac6e6f69d255611c93f63c2hding} 1468e9a21e730449c10cac6e6f69d255611c93f63c2hding 1478e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic void ISSUE_BUFFER_dump(MTX_ISSUE_BUFFERS *data) 1488e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 149e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui32MCUPositionOfScanAndPipeNo =%d\n", data->ui32MCUPositionOfScanAndPipeNo); 150e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui32MCUCntAndResetFlag =%d\n", data->ui32MCUCntAndResetFlag); 1518e9a21e730449c10cac6e6f69d255611c93f63c2hding} 1528e9a21e730449c10cac6e6f69d255611c93f63c2hding 1538e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic void JPEG_TABLE_dump(JPEG_MTX_QUANT_TABLE *data) 1548e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 1558e9a21e730449c10cac6e6f69d255611c93f63c2hding int i; 156e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t aui8LumaQuantParams {"); 1578e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY( aui8LumaQuantParams, QUANT_TABLE_SIZE_BYTES); 158e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t aui8ChromaQuantParams {"); 1598e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY( aui8ChromaQuantParams, QUANT_TABLE_SIZE_BYTES); 1608e9a21e730449c10cac6e6f69d255611c93f63c2hding} 1618e9a21e730449c10cac6e6f69d255611c93f63c2hding 1628e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic char *IMG_FRAME_TEMPLATE_TYPE2Str(IMG_FRAME_TEMPLATE_TYPE tmp) 1638e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 1648e9a21e730449c10cac6e6f69d255611c93f63c2hding switch (tmp){ 1658e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_FRAME_IDR:return "IMG_FRAME_IDR"; 1668e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_FRAME_INTRA:return "IMG_FRAME_INTRA"; 1678e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_FRAME_INTER_P:return "IMG_FRAME_INTER_P"; 1688e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_FRAME_INTER_B:return "IMG_FRAME_INTER_B"; 1698e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_FRAME_INTER_P_IDR:return "IMG_FRAME_INTER_P_IDR"; 1708e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_FRAME_UNDEFINED:return "IMG_FRAME_UNDEFINED"; 1718e9a21e730449c10cac6e6f69d255611c93f63c2hding } 1728e9a21e730449c10cac6e6f69d255611c93f63c2hding 1738e9a21e730449c10cac6e6f69d255611c93f63c2hding return "Undefined"; 1748e9a21e730449c10cac6e6f69d255611c93f63c2hding} 1758e9a21e730449c10cac6e6f69d255611c93f63c2hding 1765533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int apReconstructured_dump(context_ENC_p ctx) 1775533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 1785533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 1795533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 1805533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 1815533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data = NULL; 1825533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1835533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 1845533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 1855533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx context\n", __FUNCTION__); 1865533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 1875533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 1885533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 1895533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (data == NULL) { 1905533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR,"%s data pointer is NULL\n", __FUNCTION__); 1915533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 1925533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 1935533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1945533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 1955533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 1965533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_recon_pictures), &(ps_mem->bufs_recon_pictures.virtual_addr)); 1975533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_recon_pictures.virtual_addr == NULL) { 1985533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping reconstructed buf\n", __FUNCTION__); 1995533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2005533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2015533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2025533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i = 0; i < 8; i++) { 2035533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->apReconstructured[i]) { 2045533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapReconstructured[%02d]=x%08x\n", i, data->apReconstructured[i]); 2055533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_recon_pictures.virtual_addr, 64); 2065533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 2075533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapReconstructured[%02d]=x%08x = { }\n", i, data->apReconstructured[i]); 2085533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2095533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2105533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2115533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 2125533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_recon_pictures)); 2135533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2145533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 2155533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2165533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int apColocated_dump(context_ENC_p ctx) 2175533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 2185533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 2195533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 2205533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 2215533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data = NULL; 2225533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2235533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 2245533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 2255533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx context\n", __FUNCTION__); 2265533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2275533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2285533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 2295533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (data == NULL) { 2305533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR,"%s data pointer is NULL\n", __FUNCTION__); 2315533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2325533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2335533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2345533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 2355533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2365533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_colocated), &(ps_mem->bufs_colocated.virtual_addr)); 2375533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_colocated.virtual_addr == NULL) { 2385533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping colocated buf\n", __FUNCTION__); 2395533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2405533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2415533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2425533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i = 0; i < 8; i++) { 2435533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->apReconstructured[i]) { 2445533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapColocated[%02d]=x%08x\n", i, data->apColocated[i]); 2455533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_colocated.virtual_addr, 64); 2465533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 2475533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapColocated[%02d]=x%08x = { }\n", i, data->apColocated[i]); 2485533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2495533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2505533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2515533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 2525533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_colocated)); 2535533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2545533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 2555533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2565533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int apPV_dump(context_ENC_p ctx) 2578e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 2585533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 2595533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 2605533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 2615533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data = NULL; 2625533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2635533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 2645533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 2655533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx context\n", __FUNCTION__); 2665533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2675533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2685533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 2695533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (data == NULL) { 2705533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR,"%s data pointer is NULL\n", __FUNCTION__); 2715533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2725533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2735533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2745533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 2755533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2765533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mv), &(ps_mem->bufs_mv.virtual_addr)); 2775533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mv.virtual_addr == NULL) { 2785533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping apMV buf\n", __FUNCTION__); 2795533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2805533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2815533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2825533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i = 0; i < 16; i++) { 2835533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->apMV[i]) { 2845533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapMV[%02d]=x%08x\n", i, data->apMV[i]); 2855533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_mv.virtual_addr, 64); 2865533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 2875533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapMV[%02d]=x%08x = { }\n", i, data->apMV[i]); 2885533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2895533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 2905533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2915533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 2925533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mv)); 2935533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 2945533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 2955533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 2965533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int apWritebackRegions_dump(context_ENC_p ctx) 2975533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 2985533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 2995533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 3005533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 3015533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data = NULL; 3025533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3035533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 3045533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 3055533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx context\n", __FUNCTION__); 3065533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 3075533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 3085533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 3095533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (data == NULL) { 3105533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR,"%s data pointer is NULL\n", __FUNCTION__); 3115533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 3125533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 3135533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3145533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 3155533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3165533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ctx->bufs_writeback), &(ctx->bufs_writeback.virtual_addr)); 3175533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ctx->bufs_writeback.virtual_addr == NULL) { 3185533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping write back buf\n", __FUNCTION__); 3195533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 3205533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 3215533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3225533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i = 0; i < 32; i++) { 3235533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->apWritebackRegions[i]) { 3245533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapWritebackRegions[%02d]=x%08x\n", i, data->apWritebackRegions[i]); 3255533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ctx->bufs_writeback.virtual_addr, 64); 3265533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 3275533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapWritebackRegions[%02d]=x%08x = { }\n", i, data->apWritebackRegions[i]); 3285533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 3295533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 3305533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3315533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 3325533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ctx->bufs_writeback)); 3335533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 3345533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 3355533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3365533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanint apSliceParamsTemplates_dump(context_ENC_p ctx, IMG_UINT32 ui32StreamIndex, IMG_UINT32 ui32SliceBufIdx) 3375533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 3385533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan //IMG_FRAME_TEMPLATE_TYPE eSliceType = (IMG_FRAME_TEMPLATE_TYPE)ui32SliceType; 3395533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem *ps_mem = &(ctx->ctx_mem[ui32StreamIndex]); 3405533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan SLICE_PARAMS *p = NULL; 3415533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3425533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_slice_template), &(ps_mem->bufs_slice_template.virtual_addr)); 3435533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_slice_template.virtual_addr == NULL) { 3445533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping slice template\n", __FUNCTION__); 3455533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 3465533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 3475533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3485533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan p = (SLICE_PARAMS*)(ps_mem->bufs_slice_template.virtual_addr + (ctx->ctx_mem_size.slice_template * ui32SliceBufIdx)); 3495533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3508e9a21e730449c10cac6e6f69d255611c93f63c2hding unsigned char *ptmp = (unsigned char*)&p->sSliceHdrTmpl; 351e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32Flags=0x%08x\n", p->ui32Flags); 352e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32SliceConfig=0x%08x\n", p->ui32SliceConfig); 353e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32IPEControl=0x%08x\n", p->ui32IPEControl); 354e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32SeqConfig=0x%08x\n", p->ui32SeqConfig); 355e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\teTemplateType=%s\n", IMG_FRAME_TEMPLATE_TYPE2Str(p->eTemplateType)); 3568e9a21e730449c10cac6e6f69d255611c93f63c2hding 357e26d82700f9514cc175d2b54733ebdeb8824922ehding //PRINT_ARRAY_BYTE(ptmp, 64); 3588e9a21e730449c10cac6e6f69d255611c93f63c2hding 3598e9a21e730449c10cac6e6f69d255611c93f63c2hding MTX_HEADER_PARAMS_dump(&p->sSliceHdrTmpl); 3605533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3615533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_slice_template)); 3628e9a21e730449c10cac6e6f69d255611c93f63c2hding 3638e9a21e730449c10cac6e6f69d255611c93f63c2hding return 0; 3648e9a21e730449c10cac6e6f69d255611c93f63c2hding} 3658e9a21e730449c10cac6e6f69d255611c93f63c2hding 3665533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int apPicHdrTemplates_dump(context_ENC_p ctx, IMG_UINT32 ui32StreamIndex, IMG_UINT32 count) 367e26d82700f9514cc175d2b54733ebdeb8824922ehding{ 368cecb10be5449aa74cd1d9a2eb41c2a6a76d9ee79ywan uint32_t i; 3695533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem *ps_mem = &(ctx->ctx_mem[ui32StreamIndex]); 3705533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan MTX_HEADER_PARAMS *data; 371e26d82700f9514cc175d2b54733ebdeb8824922ehding 3725533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_pic_template), &(ps_mem->bufs_pic_template.virtual_addr)); 3735533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_pic_template.virtual_addr == NULL) { 3745533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping pic template\n", __FUNCTION__); 3755533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 3765533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 377e26d82700f9514cc175d2b54733ebdeb8824922ehding 3785533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i = 0; i < count; i++) { 379cecb10be5449aa74cd1d9a2eb41c2a6a76d9ee79ywan data = (MTX_HEADER_PARAMS *)(ps_mem->bufs_pic_template.virtual_addr + ctx->ctx_mem_size.pic_template * i); 3805533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapPicHdrTemplates[%02d]=0x%08x {\n", i, data); 381cecb10be5449aa74cd1d9a2eb41c2a6a76d9ee79ywan PRINT_ARRAY_BYTE(data, 64); \ 3825533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t}\n"); 3835533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 3845533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 385cecb10be5449aa74cd1d9a2eb41c2a6a76d9ee79ywan data = (MTX_HEADER_PARAMS *)ps_mem->bufs_pic_template.virtual_addr; 3865533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan MTX_HEADER_PARAMS_dump(data); 3875533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3885533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_pic_template)); 389e26d82700f9514cc175d2b54733ebdeb8824922ehding return 0; 390e26d82700f9514cc175d2b54733ebdeb8824922ehding} 391e26d82700f9514cc175d2b54733ebdeb8824922ehding 3925533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int auui32SliceMap_dump(context_ENC_p ctx) 3938e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 3945533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 3955533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 3965533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 3975533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data = NULL; 3985533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 3995533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 4005533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 4015533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx context\n", __FUNCTION__); 4025533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4035533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4045533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 4055533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (data == NULL) { 4065533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR,"%s data pointer is NULL\n", __FUNCTION__); 4075533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4085533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4095533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4105533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 4115533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4125533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_slice_map), &(ps_mem->bufs_slice_map.virtual_addr)); 4135533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_slice_map.virtual_addr == NULL) { 4145533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping slice map buf\n", __FUNCTION__); 4155533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4165533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4175533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4185533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i = 0; i < 9; i++) { 4195533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->aui32SliceMap[i]) { 4205533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\taui32SliceMap[%02d]=x%08x\n", i, data->aui32SliceMap[i]); 4215533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_slice_map.virtual_addr, 64); 4225533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 4235533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\taui32SliceMap[%02d]=x%08x = { }\n", i, data->aui32SliceMap[i]); 4245533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4255533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4265533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4275533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 4285533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_slice_map)); 4295533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4305533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 4315533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4325533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int apSeqHeader_dump(context_ENC_p ctx, IMG_UINT32 ui32StreamIndex) 4335533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 4345533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan MTX_HEADER_PARAMS *data; 4355533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem *ps_mem = &(ctx->ctx_mem[ui32StreamIndex]); 4365533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan tng_cmdbuf_p cmdbuf = ctx->obj_context->tng_cmdbuf; 4375533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_RC_PARAMS *psRCParams = &(ctx->sRCParams); 4385533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan H264_VUI_PARAMS *psVuiParams = &(ctx->sVuiParams); 4395533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4405533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_seq_header), &(ps_mem->bufs_seq_header.virtual_addr)); 4415533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_seq_header.virtual_addr == NULL) { 4425533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping seq header\n", __FUNCTION__); 4435533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4445533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4455533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4465533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (MTX_HEADER_PARAMS *)ps_mem->bufs_seq_header.virtual_addr; 4475533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4485533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan DO_HEADER_dump(data); 4495533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4505533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_seq_header)); 4515533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4525533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 4535533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4545533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int pFirstPassOutParamAddr_dump(context_ENC_p ctx) 4555533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 4565533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 4575533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 4585533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 4595533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data= NULL; 4605533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4615533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 4625533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 4635533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx ctx buf\n", __FUNCTION__); 4645533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4655533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4665533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4675533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 4685533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4695533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan // if enabled, return the input-control buffer corresponding to this slot 4705533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_first_pass_out_params), &(ps_mem->bufs_first_pass_out_params.virtual_addr)); 4715533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_first_pass_out_params.virtual_addr == NULL) { 4725533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping first pass out param buf\n", __FUNCTION__); 4735533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4745533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4755533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4765533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i=0; i < 9; i++) { 4775533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->pFirstPassOutParamAddr[i]) { 4785533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tpFirstPassOutParamAddr[%02d]=x%08x\n", i, data->pFirstPassOutParamAddr[i]); 4795533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_first_pass_out_params.virtual_addr, 64); 4805533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 4815533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tpFirstPassOutParamAddr[%02d]=x%08x = { }\n", i, data->pFirstPassOutParamAddr[i]); 4825533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4835533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 4845533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4855533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 4865533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_first_pass_out_params)); 4875533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 4885533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 4895533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4905533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int pFirstPassOutBestMultipassParamAddr_dump(context_ENC_p ctx) 4915533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 4925533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 4935533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 4945533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 4955533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data= NULL; 4965533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 4975533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 4985533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 4995533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx ctx buf\n", __FUNCTION__); 5005533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5015533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5025533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5035533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 5045533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5055533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan // if enabled, return the input-control buffer corresponding to this slot 5065533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_first_pass_out_best_multipass_param), &(ps_mem->bufs_first_pass_out_best_multipass_param.virtual_addr)); 5075533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_first_pass_out_best_multipass_param.virtual_addr == NULL) { 5085533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping first pass out param buf\n", __FUNCTION__); 5095533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5105533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5115533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5125533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i=0; i < 9; i++) { 5135533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->pFirstPassOutBestMultipassParamAddr[i]) { 5145533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tpFirstPassOutBestMultipassParamAddr[%02d]=x%08x\n", i, data->pFirstPassOutBestMultipassParamAddr[i]); 5155533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_first_pass_out_best_multipass_param.virtual_addr, 64); 5165533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 5175533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tpFirstPassOutBestMultipassParamAddr[%02d]=x%08x = { }\n", i, data->pFirstPassOutBestMultipassParamAddr[i]); 5185533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5195533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5205533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5215533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 5225533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_first_pass_out_best_multipass_param)); 5235533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5245533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 5255533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 526cecb10be5449aa74cd1d9a2eb41c2a6a76d9ee79ywanstatic int pMBCtrlInParamsAddr_dump(context_ENC_p ctx, IMG_UINT32 __maybe_unused ui32StreamIndex) 5275533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 5285533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 5295533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 5305533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 5315533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data= NULL; 5325533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5335533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 5345533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 5355533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx ctx buf\n", __FUNCTION__); 5365533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5375533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5385533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5395533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 5405533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5415533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan // if enabled, return the input-control buffer corresponding to this slot 5425533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mb_ctrl_in_params), &(ps_mem->bufs_mb_ctrl_in_params.virtual_addr)); 5435533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mb_ctrl_in_params.virtual_addr == NULL) { 5445533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mb ctrl buf\n", __FUNCTION__); 5455533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5465533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5475533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5485533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i=0; i < 9; i++) { 5495533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->pMBCtrlInParamsAddr[i]) { 5505533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tpMBCtrlInParamsAddr[%02d]=x%08x\n", i, data->pMBCtrlInParamsAddr[i]); 5515533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_mb_ctrl_in_params.virtual_addr, 64); 5525533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 5535533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tpMBCtrlInParamsAddr[%02d]=x%08x = { }\n", i, data->pMBCtrlInParamsAddr[i]); 5545533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5555533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5565533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5575533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 5585533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mb_ctrl_in_params)); 5595533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5605533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 5615533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5625533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int apAboveParams_dump(context_ENC_p ctx) 5635533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 5645533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 5655533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 5665533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 5675533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data= NULL; 5685533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5695533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 5705533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 5715533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx ctx buf\n", __FUNCTION__); 5725533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5735533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5745533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5755533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 5765533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5775533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan // if enabled, return the input-control buffer corresponding to this slot 5785533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_above_params), &(ps_mem->bufs_above_params.virtual_addr)); 5795533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_above_params.virtual_addr == NULL) { 5805533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping above param ctrl buf\n", __FUNCTION__); 5815533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5825533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5835533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5845533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i=0; i < 2; i++) { 5855533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->apAboveParams[i]) { 5865533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapAboveParams[%02d]=x%08x\n", i, data->apAboveParams[i]); 5875533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_above_params.virtual_addr, 64); 5885533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 5895533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapAboveParams[%02d]=x%08x = { }\n", i, data->apAboveParams[i]); 5905533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5915533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 5928e9a21e730449c10cac6e6f69d255611c93f63c2hding 5935533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 5945533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_above_params)); 5955533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 5965533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 5975533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 5985533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanstatic int aui32LTRefHeader_dump(context_ENC_p ctx) 5995533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 6005533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan int i; 6015533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem* ps_mem = &(ctx->ctx_mem[0]); 6025533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 6035533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data = NULL; 6045533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6055533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 6065533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 6075533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx context\n", __FUNCTION__); 6085533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 6095533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 6105533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 6115533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (data == NULL) { 612dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_ERROR,"%s data pointer is NULL\n", __FUNCTION__); 6135533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 6145533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 6155533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6165533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 6175533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6185533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_lt_ref_header), &(ps_mem->bufs_lt_ref_header.virtual_addr)); 6195533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_lt_ref_header.virtual_addr == NULL) { 6205533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping lt ref buf\n", __FUNCTION__); 6215533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 6225533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 6235533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6245533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan for (i = 0; i < 9; i++) { 6255533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (dump_address_content && data->aui32LTRefHeader[i]) { 6265533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\taui32LTRefHeader[%02d]=x%08x\n", i, data->aui32LTRefHeader[i]); 6275533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan PRINT_ARRAY_BYTE(ps_mem->bufs_lt_ref_header.virtual_addr, 64); 6285533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } else { 6295533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\taui32LTRefHeader[%02d]=x%08x = { }\n", i, data->aui32LTRefHeader[i]); 6305533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 6315533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 6325533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6335533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 6345533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_lt_ref_header)); 6355533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return 0; 6365533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan} 6375533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6385533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohanvoid tng_trace_setvideo(context_ENC_p ctx, IMG_UINT32 ui32StreamID) 6395533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan{ 6405533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan unsigned int i; 6415533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6425533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem *ps_mem = &(ctx->ctx_mem[ui32StreamID]); 6435533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan context_ENC_mem_size *ps_mem_size = &(ctx->ctx_mem_size); 6445533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan IMG_MTX_VIDEO_CONTEXT* data= NULL; 6455533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6465533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_map(&(ps_mem->bufs_mtx_context), &(ps_mem->bufs_mtx_context.virtual_addr)); 6475533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (ps_mem->bufs_mtx_context.virtual_addr == NULL) { 6485533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR, "%s error: mapping mtx context\n", __FUNCTION__); 6498e9a21e730449c10cac6e6f69d255611c93f63c2hding return ; 650dd0a0b792078d587a2e266f146ccd287c39a742dedward lin } 651dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 6525533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan data = (IMG_MTX_VIDEO_CONTEXT*)(ps_mem->bufs_mtx_context.virtual_addr); 6535533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6545533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan if (data == NULL) { 6555533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_DEBUG_ERROR,"%s data pointer is NULL\n", __FUNCTION__); 6565533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan return ; 6575533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan } 658dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 659e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t==========IMG_MTX_VIDEO_CONTEXT=============\n"); 660e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui64ClockDivBitrate=%lld\n", data->ui64ClockDivBitrate); 661e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32WidthInMbs=%d\n", data->ui32WidthInMbs); 662e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32PictureHeightInMbs=%d\n", data->ui32PictureHeightInMbs); 6638e9a21e730449c10cac6e6f69d255611c93f63c2hding#ifdef FORCED_REFERENCE 664e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apTmpReconstructured {"); 665e26d82700f9514cc175d2b54733ebdeb8824922ehding PRINT_ARRAY_ADDR("apTmpReconstructured", apTmpReconstructured, MAX_PIC_NODES); 6668e9a21e730449c10cac6e6f69d255611c93f63c2hding#endif 6675533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apReconstructured {\n"); 6685533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apReconstructured_dump(ctx); 6695533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apColocated {\n"); 6705533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apColocated_dump(ctx); 6715533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apMV {\n"); 6725533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apPV_dump(ctx); 673e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apInterViewMV {"); 6748e9a21e730449c10cac6e6f69d255611c93f63c2hding// PRINT_ARRAY( apInterViewMV, 2 ); 6758e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY_ADDR("apInterViewMV", apInterViewMV, 2); 6768e9a21e730449c10cac6e6f69d255611c93f63c2hding 677e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32DebugCRCs=0x%x\n", data->ui32DebugCRCs); 6785533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apWritebackRegions {\n"); 6795533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apWritebackRegions_dump(ctx); 680e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32InitialCPBremovaldelayoffset=0x%x\n", data->ui32InitialCPBremovaldelayoffset); 681e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32MaxBufferMultClockDivBitrate=0x%x\n", data->ui32MaxBufferMultClockDivBitrate); 682e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t pSEIBufferingPeriodTemplate=0x%x\n", data->pSEIBufferingPeriodTemplate); 683e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t pSEIPictureTimingTemplate=0x%x\n", data->pSEIPictureTimingTemplate); 684e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b16EnableMvc=%d\n", data->b16EnableMvc); 685e26d82700f9514cc175d2b54733ebdeb8824922ehding //drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b16EnableInterViewReference=%d\n", data->b16EnableInterViewReference); 686e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui16MvcViewIdx=0x%x\n", data->ui16MvcViewIdx); 687e26d82700f9514cc175d2b54733ebdeb8824922ehding 688e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apSliceParamsTemplates {\n"); 6898e9a21e730449c10cac6e6f69d255611c93f63c2hding //PRINT_ARRAY_ADDR( apSliceParamsTemplates, 5); 6908e9a21e730449c10cac6e6f69d255611c93f63c2hding for (i=0; i<5; i++) { 691e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tapSliceParamsTemplates[%d]=0x%08x {\n", i, data->apSliceParamsTemplates[i]); 6925533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apSliceParamsTemplates_dump(ctx, 0, i); 693e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t}\n"); 6948e9a21e730449c10cac6e6f69d255611c93f63c2hding } 6958e9a21e730449c10cac6e6f69d255611c93f63c2hding 6965533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apPicHdrTemplates {\n"); 6975533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apPicHdrTemplates_dump(ctx, 0, 5); 6985533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 6995533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui32SliceMap {\n"); 7005533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan auui32SliceMap_dump(ctx); 7018e9a21e730449c10cac6e6f69d255611c93f63c2hding 702e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32FlatGopStruct=0x%x\n", data->ui32FlatGopStruct); 703e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apSeqHeader =0x%x\n", data->apSeqHeader); 7045533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apSeqHeader_dump(ctx, 0); 7055533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 706e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apSubSetSeqHeader =0x%x\n", data->apSubSetSeqHeader); 707e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b16NoSequenceHeaders =0x%x\n", data->b16NoSequenceHeaders); 7088e9a21e730449c10cac6e6f69d255611c93f63c2hding 709e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8WeightedPredictionEnabled=%d\n", data->b8WeightedPredictionEnabled); 710e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8MTXWeightedImplicitBiPred=0x%x\n", data->ui8MTXWeightedImplicitBiPred); 711e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui32WeightedPredictionVirtAddr {"); 7128e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY(aui32WeightedPredictionVirtAddr, MAX_SOURCE_SLOTS_SL); 713e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32HierarGopStruct=0x%x\n", data->ui32HierarGopStruct); 7148e9a21e730449c10cac6e6f69d255611c93f63c2hding 7155533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t pFirstPassOutParamAddr {\n"); 7165533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan pFirstPassOutParamAddr_dump(ctx); 7178e9a21e730449c10cac6e6f69d255611c93f63c2hding#ifndef EXCLUDE_BEST_MP_DECISION_DATA 718e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t pFirstPassOutBestMultipassParamAddr {"); 7195533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan pFirstPassOutBestMultipassParamAddr_dump(ctx); 7208e9a21e730449c10cac6e6f69d255611c93f63c2hding#endif 7215533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t pMBCtrlInParamsAddr {\n"); 7225533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan pMBCtrlInParamsAddr_dump(ctx, 0); 7235533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 724e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32InterIntraScale{"); 7258e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY( ui32InterIntraScale, SCALE_TBL_SZ); 726e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32SkippedCodedScale {"); 7278e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY( ui32SkippedCodedScale, SCALE_TBL_SZ); 7288e9a21e730449c10cac6e6f69d255611c93f63c2hding 7298e9a21e730449c10cac6e6f69d255611c93f63c2hding 730e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32PicRowStride=0x%x\n", data->ui32PicRowStride); 7318e9a21e730449c10cac6e6f69d255611c93f63c2hding 7325533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t apAboveParams {\n"); 7335533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan apAboveParams_dump(ctx); 7348e9a21e730449c10cac6e6f69d255611c93f63c2hding 735e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32IdrPeriod =0x%x\n ", data->ui32IdrPeriod); 736e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32IntraLoopCnt =0x%x\n", data->ui32IntraLoopCnt); 737e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32BFrameCount =0x%x\n", data->ui32BFrameCount); 738e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8Hierarchical=%d\n", data->b8Hierarchical); 739e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8MPEG2IntraDCPrecision =0x%x\n", data->ui8MPEG2IntraDCPrecision); 7408e9a21e730449c10cac6e6f69d255611c93f63c2hding 741e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui8PicOnLevel {"); 742e26d82700f9514cc175d2b54733ebdeb8824922ehding PRINT_ARRAY(aui8PicOnLevel, MAX_REF_LEVELS); 743e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32VopTimeResolution=0x%x\n", data->ui32VopTimeResolution); 744e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32InitialQp=0x%x\n", data->ui32InitialQp); 745e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32BUSize=0x%x\n", data->ui32BUSize); 746e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t sMVSettingsIdr { \n\t\t\tui32MVCalc_Below=0x%x\n \t\t\tui32MVCalc_Colocated=0x%x\n \t\t\tui32MVCalc_Config=0x%x\n \t\t}\n", data->sMVSettingsIdr.ui32MVCalc_Below,data->sMVSettingsIdr.ui32MVCalc_Colocated, data->sMVSettingsIdr.ui32MVCalc_Config); 7478e9a21e730449c10cac6e6f69d255611c93f63c2hding 748e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t sMVSettingsNonB { \n"); 7498e9a21e730449c10cac6e6f69d255611c93f63c2hding for(i=0;i<MAX_BFRAMES +1;i++) 750e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\tui32MVCalc_Below=0x%x ui32MVCalc_Colocated=0x%x ui32MVCalc_Config=0x%x }\n", data->sMVSettingsNonB[i].ui32MVCalc_Below,data->sMVSettingsNonB[i].ui32MVCalc_Colocated, data->sMVSettingsNonB[i].ui32MVCalc_Config); 751e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t}\n"); 7528e9a21e730449c10cac6e6f69d255611c93f63c2hding 753e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP," \t ui32MVSettingsBTable=0x%x\n", data->ui32MVSettingsBTable); 754e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP," \t ui32MVSettingsHierarchical=0x%x\n", data->ui32MVSettingsHierarchical); 7558e9a21e730449c10cac6e6f69d255611c93f63c2hding 7568e9a21e730449c10cac6e6f69d255611c93f63c2hding#ifdef FIRMWARE_BIAS 757e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui32DirectBias_P {"); 7588e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY_NEW(aui32DirectBias_P,27 ); 759e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui32InterBias_P {"); 7608e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY_NEW(aui32InterBias_P,27 ); 761e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui32DirectBias_B {"); 7628e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY_NEW(aui32DirectBias_B,27 ); 763e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui32InterBias_B {"); 7648e9a21e730449c10cac6e6f69d255611c93f63c2hding PRINT_ARRAY_NEW(aui32InterBias_B,27 ); 7658e9a21e730449c10cac6e6f69d255611c93f63c2hding#endif 766e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t eFormat=%d\n", data->eFormat); 767e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t eStandard=%d\n", data->eStandard); 768e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t eRCMode=%d\n", data->eRCMode); 769e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8FirstPic=%d\n", data->b8FirstPic); 770e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8IsInterlaced=%d\n", data->b8IsInterlaced); 771e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8TopFieldFirst=%d\n", data->b8TopFieldFirst); 772e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8ArbitrarySO=%d\n", data->b8ArbitrarySO); 773e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t bOutputReconstructed=%d\n", data->bOutputReconstructed); 774e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8DisableBitStuffing=%d\n", data->b8DisableBitStuffing); 775e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8InsertHRDparams=%d\n", data->b8InsertHRDparams); 776e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8MaxSlicesPerPicture=%d\n", data->ui8MaxSlicesPerPicture); 777e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8NumPipes=%d\n", data->ui8NumPipes); 778e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t bCARC=%d\n", data->bCARC); 779e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t iCARCBaseline=%d\n", data->iCARCBaseline); 780e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t uCARCThreshold=%d\n", data->uCARCThreshold); 781e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t uCARCCutoff=%d\n", data->uCARCCutoff); 782e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t uCARCNegRange=%d\n", data->uCARCNegRange); 783e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t uCARCNegScale=%d\n", data->uCARCNegScale); 784e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t uCARCPosRange=%d\n", data->uCARCPosRange); 785e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t uCARCPosScale=%d\n", data->uCARCPosScale); 786e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t uCARCShift=%d\n", data->uCARCShift); 787e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32MVClip_Config=%d\n", data->ui32MVClip_Config); 788e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32PredCombControl=%d\n", data->ui32PredCombControl); 789e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32LRITC_Tile_Use_Config=%d\n", data->ui32LRITC_Tile_Use_Config); 790e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32LRITC_Cache_Chunk_Config=%d\n", data->ui32LRITC_Cache_Chunk_Config); 791e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32IPEVectorClipping=%d\n", data->ui32IPEVectorClipping); 792e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32H264CompControl=%d\n", data->ui32H264CompControl); 793e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32H264CompIntraPredModes=%d\n", data->ui32H264CompIntraPredModes); 794e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32IPCM_0_Config=%d\n", data->ui32IPCM_0_Config); 795e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32IPCM_1_Config=%d\n", data->ui32IPCM_1_Config); 796e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32SPEMvdClipRange=%d\n", data->ui32SPEMvdClipRange); 797e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32JMCompControl=%d\n", data->ui32JMCompControl); 798e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32MBHostCtrl=%d\n", data->ui32MBHostCtrl); 799e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32DeblockCtrl=%d\n", data->ui32DeblockCtrl); 8008e9a21e730449c10cac6e6f69d255611c93f63c2hding 801e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32SkipCodedInterIntra=%d\n", data->ui32SkipCodedInterIntra); 802e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32VLCControl=%d\n", data->ui32VLCControl); 803e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32VLCSliceControl=%d\n", data->ui32VLCSliceControl); 804e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32VLCSliceMBControl=%d\n", data->ui32VLCSliceMBControl); 805e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui16CQPOffset=%d\n", data->ui16CQPOffset); 806e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8CodedHeaderPerSlice=%d\n", data->b8CodedHeaderPerSlice); 807e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32FirstPicFlags=%d\n", data->ui32FirstPicFlags); 808e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32NonFirstPicFlags=%d\n", data->ui32NonFirstPicFlags); 8098e9a21e730449c10cac6e6f69d255611c93f63c2hding 8108e9a21e730449c10cac6e6f69d255611c93f63c2hding#ifndef EXCLUDE_ADAPTIVE_ROUNDING 811e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t bMCAdaptiveRoundingDisable=%d\n",data->bMCAdaptiveRoundingDisable); 8128e9a21e730449c10cac6e6f69d255611c93f63c2hding int j; 813e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui16MCAdaptiveRoundingOffsets[18][4]"); 814e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n"); 8158e9a21e730449c10cac6e6f69d255611c93f63c2hding for(i=0;i<18;i++){ 8168e9a21e730449c10cac6e6f69d255611c93f63c2hding for(j=0;j<4;j++) 817e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\t0x%x", data-> ui16MCAdaptiveRoundingOffsets[i][j]); 818e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n"); 8198e9a21e730449c10cac6e6f69d255611c93f63c2hding } 8208e9a21e730449c10cac6e6f69d255611c93f63c2hding#endif 8218e9a21e730449c10cac6e6f69d255611c93f63c2hding 8228e9a21e730449c10cac6e6f69d255611c93f63c2hding#ifdef FORCED_REFERENCE 823e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32PatchedReconAddress=0x%x\n", data->ui32PatchedReconAddress); 824e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32PatchedRef0Address=0x%x\n", data->ui32PatchedRef0Address); 825e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui32PatchedRef1Address=0x%x\n", data->ui32PatchedRef1Address); 8268e9a21e730449c10cac6e6f69d255611c93f63c2hding#endif 8278e9a21e730449c10cac6e6f69d255611c93f63c2hding#ifdef LTREFHEADER 8285533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t aui32LTRefHeader {\n"); 8295533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan aui32LTRefHeader_dump(ctx); 830e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t i8SliceHeaderSlotNum=%d\n",data->i8SliceHeaderSlotNum); 8318e9a21e730449c10cac6e6f69d255611c93f63c2hding#endif 832e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8ReconIsLongTerm=%d\n", data->b8ReconIsLongTerm); 833e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8Ref0IsLongTerm=%d\n", data->b8Ref0IsLongTerm); 834e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t b8Ref1IsLongTerm=%d\n", data->b8Ref1IsLongTerm); 835e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8RefSpacing=0x%x\n", data->ui8RefSpacing); 836e26d82700f9514cc175d2b54733ebdeb8824922ehding 837e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8FirstPipe=0x%x\n", data->ui8FirstPipe); 838e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8LastPipe=0x%x\n", data->ui8LastPipe); 839e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t ui8PipesToUseFlags=0x%x\n", data->ui8PipesToUseFlags); 8408e9a21e730449c10cac6e6f69d255611c93f63c2hding 841e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t sInParams {\n"); 842e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16MBPerFrm=%d\n",data->sInParams.ui16MBPerFrm); 843e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16MBPerBU=%d\n", data->sInParams.ui16MBPerBU); 844e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16BUPerFrm=%d\n",data->sInParams.ui16BUPerFrm); 845e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16IntraPerio=%d\n",data->sInParams.ui16IntraPeriod); 846e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16BFrames=%d\n", data->sInParams.ui16BFrames); 847e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t bHierarchicalMode=%d\n",data->sInParams.mode.h264.bHierarchicalMode); 848e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32BitsPerFrm=%d\n", data->sInParams.i32BitsPerFrm); 849e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32BitsPerBU=%d\n", data->sInParams.i32BitsPerBU); 850e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32BitsPerMB=%d\n", data->sInParams.mode.other.i32BitsPerMB); 851e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32BitRate=%d\n",data->sInParams.i32BitRate); 852e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32BufferSiz=%d\n",data->sInParams.i32BufferSize ); 853e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32InitialLevel=%d\n", data->sInParams.i32InitialLevel); 854e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32InitialDelay=%d\n", data->sInParams.i32InitialDelay); 855e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32BitsPerGOP=%d\n", data->sInParams.mode.other.i32BitsPerGOP); 856e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16AvQPVal=%d\n", data->sInParams.mode.other.ui16AvQPVal); 857e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui16MyInitQP=%d\n",data->sInParams.mode.other.ui16MyInitQP); 858e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui32RCScaleFactor=%d\n",data->sInParams.mode.h264.ui32RCScaleFactor); 859e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t bScDetectDis;=%d\n", data->sInParams.mode.h264.bScDetectDisable); 860e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t bFrmSkipDisable=%d\n",data->sInParams.bFrmSkipDisable); 861e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t bBUSkipDisable=%d\n",data->sInParams.mode.other.bBUSkipDisable); 862e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui8SeInitQP=%d\n", data->sInParams.ui8SeInitQP ); 863e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui8MinQPVal=%d\n", data->sInParams.ui8MinQPVal ); 864e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui8MaxQPVal=%d\n", data->sInParams.ui8MaxQPVal ); 865e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui8MBPerRow=%d\n", data->sInParams.ui8MBPerRow ); 866e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui8ScaleFactor=%d\n", data->sInParams.ui8ScaleFactor); 867e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui8HalfFrame=%d\n", data->sInParams.mode.other.ui8HalfFrameRate); 868e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t ui8FCode=%d\n", data->sInParams.mode.other.ui8FCode); 869e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t i32TransferRate=%d\n",data->sInParams.mode.h264.i32TransferRate); 8708e9a21e730449c10cac6e6f69d255611c93f63c2hding 871e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t}\n"); 8725533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 8735533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan psb_buffer_unmap(&(ps_mem->bufs_mtx_context)); 8745533a0d04c61d112d75f4e1f9fe61c703ff6c3c9Ren Zhaohan 875dd0a0b792078d587a2e266f146ccd287c39a742dedward lin return; 8768e9a21e730449c10cac6e6f69d255611c93f63c2hding} 8778e9a21e730449c10cac6e6f69d255611c93f63c2hding 8788e9a21e730449c10cac6e6f69d255611c93f63c2hdingstruct header_token { 8798e9a21e730449c10cac6e6f69d255611c93f63c2hding int token; 8808e9a21e730449c10cac6e6f69d255611c93f63c2hding char *str; 8818e9a21e730449c10cac6e6f69d255611c93f63c2hding} header_tokens[] = { 8828e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_STARTCODE_RAWDATA,"ELEMENT_STARTCODE_RAWDATA=0"}, 8838e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_STARTCODE_MIDHDR,"ELEMENT_STARTCODE_MIDHDR"}, 8848e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_RAWDATA,"ELEMENT_RAWDATA"}, 8858e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_QP,"ELEMENT_QP"}, 8868e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_SQP,"ELEMENT_SQP"}, 8878e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_FRAMEQSCALE,"ELEMENT_FRAMEQSCALE"}, 8888e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_SLICEQSCALE,"ELEMENT_SLICEQSCALE"}, 8898e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_INSERTBYTEALIGN_H264,"ELEMENT_INSERTBYTEALIGN_H264"}, 8908e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_INSERTBYTEALIGN_MPG4,"ELEMENT_INSERTBYTEALIGN_MPG4"}, 8918e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_INSERTBYTEALIGN_MPG2,"ELEMENT_INSERTBYTEALIGN_MPG2"}, 8928e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_VBV_MPG2,"ELEMENT_VBV_MPG2"}, 8938e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_TEMPORAL_REF_MPG2,"ELEMENT_TEMPORAL_REF_MPG2"}, 8948e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_CURRMBNR,"ELEMENT_CURRMBNR"}, 8958e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_FRAME_NUM,"ELEMENT_FRAME_NUM"}, 8968e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_TEMPORAL_REFERENCE,"ELEMENT_TEMPORAL_REFERENCE"}, 8978e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_EXTENDED_TR,"ELEMENT_EXTENDED_TR"}, 8988e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_IDR_PIC_ID,"ELEMENT_IDR_PIC_ID"}, 8998e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_PIC_ORDER_CNT,"ELEMENT_PIC_ORDER_CNT"}, 9008e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_GOB_FRAME_ID,"ELEMENT_GOB_FRAME_ID"}, 9018e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_VOP_TIME_INCREMENT,"ELEMENT_VOP_TIME_INCREMENT"}, 9028e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_MODULO_TIME_BASE,"ELEMENT_MODULO_TIME_BASE"}, 9038e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_BOTTOM_FIELD,"ELEMENT_BOTTOM_FIELD"}, 9048e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_SLICE_NUM,"ELEMENT_SLICE_NUM"}, 9058e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_MPEG2_SLICE_VERTICAL_POS,"ELEMENT_MPEG2_SLICE_VERTICAL_POS"}, 9068e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_MPEG2_IS_INTRA_SLICE,"ELEMENT_MPEG2_IS_INTRA_SLICE"}, 9078e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_MPEG2_PICTURE_STRUCTURE,"ELEMENT_MPEG2_PICTURE_STRUCTURE"}, 9088e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_REFERENCE,"ELEMENT_REFERENCE"}, 9098e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_ADAPTIVE,"ELEMENT_ADAPTIVE"}, 9108e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_DIRECT_SPATIAL_MV_FLAG,"ELEMENT_DIRECT_SPATIAL_MV_FLAG"}, 9118e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_NUM_REF_IDX_ACTIVE,"ELEMENT_NUM_REF_IDX_ACTIVE"}, 9128e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_REORDER_L0,"ELEMENT_REORDER_L0"}, 9138e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_REORDER_L1,"ELEMENT_REORDER_L1"}, 9148e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_TEMPORAL_ID,"ELEMENT_TEMPORAL_ID"}, 9158e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_ANCHOR_PIC_FLAG,"ELEMENT_ANCHOR_PIC_FLAG"}, 9168e9a21e730449c10cac6e6f69d255611c93f63c2hding {BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY,"BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY"}, 9178e9a21e730449c10cac6e6f69d255611c93f63c2hding {BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY_OFFSET,"BPH_SEI_NAL_INITIAL_CPB_REMOVAL_DELAY_OFFSET"}, 9188e9a21e730449c10cac6e6f69d255611c93f63c2hding {PTH_SEI_NAL_CPB_REMOVAL_DELAY,"PTH_SEI_NAL_CPB_REMOVAL_DELAY"}, 9198e9a21e730449c10cac6e6f69d255611c93f63c2hding {PTH_SEI_NAL_DPB_OUTPUT_DELAY,"PTH_SEI_NAL_DPB_OUTPUT_DELAY"}, 9208e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_SLICEWEIGHTEDPREDICTIONSTRUCT,"ELEMENT_SLICEWEIGHTEDPREDICTIONSTRUCT"}, 9218e9a21e730449c10cac6e6f69d255611c93f63c2hding {ELEMENT_CUSTOM_QUANT,"ELEMENT_CUSTOM_QUANT"} 9228e9a21e730449c10cac6e6f69d255611c93f63c2hding}; 9238e9a21e730449c10cac6e6f69d255611c93f63c2hding 9248e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic char *header_to_str(int token) 9258e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 926dd0a0b792078d587a2e266f146ccd287c39a742dedward lin unsigned int i; 9278e9a21e730449c10cac6e6f69d255611c93f63c2hding struct header_token *p; 9288e9a21e730449c10cac6e6f69d255611c93f63c2hding 9298e9a21e730449c10cac6e6f69d255611c93f63c2hding for (i=0; i<sizeof(header_tokens)/sizeof(struct header_token); i++) { 9308e9a21e730449c10cac6e6f69d255611c93f63c2hding p = &header_tokens[i]; 9318e9a21e730449c10cac6e6f69d255611c93f63c2hding if (p->token == token) 9328e9a21e730449c10cac6e6f69d255611c93f63c2hding return p->str; 9338e9a21e730449c10cac6e6f69d255611c93f63c2hding } 9348e9a21e730449c10cac6e6f69d255611c93f63c2hding 9358e9a21e730449c10cac6e6f69d255611c93f63c2hding return "Invalid header token"; 9368e9a21e730449c10cac6e6f69d255611c93f63c2hding} 9378e9a21e730449c10cac6e6f69d255611c93f63c2hding 9388e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic int MTX_HEADER_PARAMS_dump(MTX_HEADER_PARAMS *p) 9398e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 9408e9a21e730449c10cac6e6f69d255611c93f63c2hding MTX_HEADER_ELEMENT *last_element=NULL; 941dd0a0b792078d587a2e266f146ccd287c39a742dedward lin unsigned int i; 9428e9a21e730449c10cac6e6f69d255611c93f63c2hding 943e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32Elements=%d\n", p->ui32Elements); 9448e9a21e730449c10cac6e6f69d255611c93f63c2hding for (i=0; i<p->ui32Elements; i++) { 9458e9a21e730449c10cac6e6f69d255611c93f63c2hding MTX_HEADER_ELEMENT *q = &(p->asElementStream[0]); 9468e9a21e730449c10cac6e6f69d255611c93f63c2hding 9478e9a21e730449c10cac6e6f69d255611c93f63c2hding if (last_element) { 9488e9a21e730449c10cac6e6f69d255611c93f63c2hding int ui8Offset = 0; 9498e9a21e730449c10cac6e6f69d255611c93f63c2hding IMG_UINT8 *ui8P; 9508e9a21e730449c10cac6e6f69d255611c93f63c2hding 9518e9a21e730449c10cac6e6f69d255611c93f63c2hding if (last_element->Element_Type==ELEMENT_STARTCODE_RAWDATA || 9528e9a21e730449c10cac6e6f69d255611c93f63c2hding last_element->Element_Type==ELEMENT_RAWDATA || 9538e9a21e730449c10cac6e6f69d255611c93f63c2hding last_element->Element_Type==ELEMENT_STARTCODE_MIDHDR) 9548e9a21e730449c10cac6e6f69d255611c93f63c2hding { 9558e9a21e730449c10cac6e6f69d255611c93f63c2hding //Add a new element aligned to word boundary 9568e9a21e730449c10cac6e6f69d255611c93f63c2hding //Find RAWBit size in bytes (rounded to word boundary)) 9578e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset=last_element->ui8Size+8+31; // NumberofRawbits (excluding size of bit count field)+ size of the bitcount field 9588e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset/=32; //Now contains rawbits size in words 9598e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset+=1; //Now contains rawbits+element_type size in words 9608e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset*=4; //Convert to number of bytes (total size of structure in bytes, aligned to word boundary). 9618e9a21e730449c10cac6e6f69d255611c93f63c2hding } 9628e9a21e730449c10cac6e6f69d255611c93f63c2hding else 9638e9a21e730449c10cac6e6f69d255611c93f63c2hding { 9648e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset=4; 9658e9a21e730449c10cac6e6f69d255611c93f63c2hding } 9668e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8P=(IMG_UINT8 *) last_element; 9678e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8P+=ui8Offset; 9688e9a21e730449c10cac6e6f69d255611c93f63c2hding q=(MTX_HEADER_ELEMENT *) ui8P; 9698e9a21e730449c10cac6e6f69d255611c93f63c2hding } 9708e9a21e730449c10cac6e6f69d255611c93f63c2hding 971e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t----Head %d----\n",i); 972e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\tElement_Type=%d(0x%x:%s)\n", 9738e9a21e730449c10cac6e6f69d255611c93f63c2hding q->Element_Type, q->Element_Type, header_to_str(q->Element_Type)); 9748e9a21e730449c10cac6e6f69d255611c93f63c2hding 9758e9a21e730449c10cac6e6f69d255611c93f63c2hding if (q->Element_Type==ELEMENT_STARTCODE_RAWDATA || 9768e9a21e730449c10cac6e6f69d255611c93f63c2hding q->Element_Type==ELEMENT_RAWDATA || 9778e9a21e730449c10cac6e6f69d255611c93f63c2hding q->Element_Type==ELEMENT_STARTCODE_MIDHDR) { 9788e9a21e730449c10cac6e6f69d255611c93f63c2hding int i, ui8Offset = 0; 9798e9a21e730449c10cac6e6f69d255611c93f63c2hding IMG_UINT8 *ui8P; 9808e9a21e730449c10cac6e6f69d255611c93f63c2hding 981e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\tui8Size=%d(0x%x)\n", q->ui8Size, q->ui8Size); 982e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\t(====aui8Bits===)"); 9838e9a21e730449c10cac6e6f69d255611c93f63c2hding 9848e9a21e730449c10cac6e6f69d255611c93f63c2hding //Find RAWBit size in bytes (rounded to word boundary)) 9858e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset=q->ui8Size+8+31; // NumberofRawbits (excluding size of bit count field)+ size of the bitcount field 9868e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset/=32; //Now contains rawbits size in words 9878e9a21e730449c10cac6e6f69d255611c93f63c2hding //ui8Offset+=1; //Now contains rawbits+element_type size in words 9888e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8Offset*=4; //Convert to number of bytes (total size of structure in bytes, aligned to word boundar 9898e9a21e730449c10cac6e6f69d255611c93f63c2hding 9908e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8P = &q->aui8Bits; 9918e9a21e730449c10cac6e6f69d255611c93f63c2hding for (i=0; i<ui8Offset; i++) { 9928e9a21e730449c10cac6e6f69d255611c93f63c2hding if ((i%8) == 0) 993e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\t\t\t"); 994e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"0x%02x\t", *ui8P); 9958e9a21e730449c10cac6e6f69d255611c93f63c2hding ui8P++; 9968e9a21e730449c10cac6e6f69d255611c93f63c2hding } 997e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n"); 9988e9a21e730449c10cac6e6f69d255611c93f63c2hding } else { 999e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\t\t(no ui8Size/aui8Bits for this type header)\n"); 10008e9a21e730449c10cac6e6f69d255611c93f63c2hding } 10018e9a21e730449c10cac6e6f69d255611c93f63c2hding 10028e9a21e730449c10cac6e6f69d255611c93f63c2hding last_element = q; 10038e9a21e730449c10cac6e6f69d255611c93f63c2hding } 10048e9a21e730449c10cac6e6f69d255611c93f63c2hding 10058e9a21e730449c10cac6e6f69d255611c93f63c2hding return 0; 10068e9a21e730449c10cac6e6f69d255611c93f63c2hding} 10078e9a21e730449c10cac6e6f69d255611c93f63c2hding 1008e26d82700f9514cc175d2b54733ebdeb8824922ehdingstatic char *eBufferType2str(IMG_REF_BUFFER_TYPE tmp) 10098e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 10108e9a21e730449c10cac6e6f69d255611c93f63c2hding switch (tmp) { 10118e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_BUFFER_REF0: 10128e9a21e730449c10cac6e6f69d255611c93f63c2hding return "IMG_BUFFER_REF0"; 10138e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_BUFFER_REF1: 10148e9a21e730449c10cac6e6f69d255611c93f63c2hding return "IMG_BUFFER_REF1"; 10158e9a21e730449c10cac6e6f69d255611c93f63c2hding case IMG_BUFFER_RECON: 10168e9a21e730449c10cac6e6f69d255611c93f63c2hding return "IMG_BUFFER_RECON"; 10178e9a21e730449c10cac6e6f69d255611c93f63c2hding default: 10188e9a21e730449c10cac6e6f69d255611c93f63c2hding return "Unknown Buffer Type"; 10198e9a21e730449c10cac6e6f69d255611c93f63c2hding } 10208e9a21e730449c10cac6e6f69d255611c93f63c2hding} 10218e9a21e730449c10cac6e6f69d255611c93f63c2hding 1022e26d82700f9514cc175d2b54733ebdeb8824922ehdingstatic void PROVIDEBUFFER_SOURCE_dump(void *data) 10238e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 1024e26d82700f9514cc175d2b54733ebdeb8824922ehding IMG_SOURCE_BUFFER_PARAMS *source = (IMG_SOURCE_BUFFER_PARAMS*) data; 1025e26d82700f9514cc175d2b54733ebdeb8824922ehding 1026e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32PhysAddrYPlane_Field0=0x%x\n",source->ui32PhysAddrYPlane_Field0); 1027e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32PhysAddrUPlane_Field0=0x%x\n",source->ui32PhysAddrUPlane_Field0); 1028e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32PhysAddrVPlane_Field0=0x%x\n",source->ui32PhysAddrVPlane_Field0); 1029e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32PhysAddrYPlane_Field1=0x%x\n",source->ui32PhysAddrYPlane_Field1); 1030e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32PhysAddrUPlane_Field1=0x%x\n",source->ui32PhysAddrUPlane_Field1); 1031e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32PhysAddrVPlane_Field1=0x%x\n",source->ui32PhysAddrVPlane_Field1); 1032e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui32HostContext=%d\n",source->ui32HostContext); 1033e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui8DisplayOrderNum=%d\n",source->ui8DisplayOrderNum); 1034e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\tui8SlotNum=%d\n",source->ui8SlotNum); 1035e26d82700f9514cc175d2b54733ebdeb8824922ehding return ; 1036e26d82700f9514cc175d2b54733ebdeb8824922ehding} 10378e9a21e730449c10cac6e6f69d255611c93f63c2hding 1038e26d82700f9514cc175d2b54733ebdeb8824922ehdingstatic int PROVIDEBUFFER_dump(unsigned int data) 1039e26d82700f9514cc175d2b54733ebdeb8824922ehding{ 1040e26d82700f9514cc175d2b54733ebdeb8824922ehding IMG_REF_BUFFER_TYPE eBufType = (data & MASK_MTX_MSG_PROVIDE_REF_BUFFER_USE) >> SHIFT_MTX_MSG_PROVIDE_REF_BUFFER_USE; 1041e26d82700f9514cc175d2b54733ebdeb8824922ehding //IMG_BUFFER_DATA *bufdata = p->sData; 1042e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\t\teBufferType=(%s)\n", eBufferType2str(eBufType)); 1043e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\n"); 10448e9a21e730449c10cac6e6f69d255611c93f63c2hding 10458e9a21e730449c10cac6e6f69d255611c93f63c2hding return 0; 10468e9a21e730449c10cac6e6f69d255611c93f63c2hding} 10478e9a21e730449c10cac6e6f69d255611c93f63c2hding 10488e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic char *eSubtype2str(IMG_PICMGMT_TYPE eSubtype) 10498e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 10508e9a21e730449c10cac6e6f69d255611c93f63c2hding switch (eSubtype) { 1051e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_REF_TYPE:return "IMG_PICMGMT_REF_TYPE"; 1052e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_GOP_STRUCT:return "IMG_PICMGMT_GOP_STRUCT"; 1053e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_SKIP_FRAME:return "IMG_PICMGMT_SKIP_FRAME"; 1054e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_EOS:return "IMG_PICMGMT_EOS"; 1055e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_FLUSH:return "IMG_PICMGMT_FLUSH"; 1056e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_QUANT:return "IMG_PICMGMT_QUANT"; 1057e26d82700f9514cc175d2b54733ebdeb8824922ehding default: return "Unknow"; 10588e9a21e730449c10cac6e6f69d255611c93f63c2hding } 10598e9a21e730449c10cac6e6f69d255611c93f63c2hding} 1060e26d82700f9514cc175d2b54733ebdeb8824922ehdingint PICMGMT_dump(IMG_UINT32 data) 10618e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 1062e26d82700f9514cc175d2b54733ebdeb8824922ehding IMG_PICMGMT_TYPE eSubType = (data & MASK_MTX_MSG_PICMGMT_SUBTYPE) >> SHIFT_MTX_MSG_PICMGMT_SUBTYPE; 1063e26d82700f9514cc175d2b54733ebdeb8824922ehding IMG_FRAME_TYPE eFrameType = 0; 1064e26d82700f9514cc175d2b54733ebdeb8824922ehding IMG_UINT32 ui32FrameCount = 0; 1065e26d82700f9514cc175d2b54733ebdeb8824922ehding 1066e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP, 1067e26d82700f9514cc175d2b54733ebdeb8824922ehding "\t\teSubtype=%d(%s)\n", eSubType, eSubtype2str(eSubType)); 1068e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP, 1069e26d82700f9514cc175d2b54733ebdeb8824922ehding "\t\t(=====(additional data)=====\n"); 1070e26d82700f9514cc175d2b54733ebdeb8824922ehding switch (eSubType) { 1071e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_REF_TYPE: 1072e26d82700f9514cc175d2b54733ebdeb8824922ehding eFrameType = (data & MASK_MTX_MSG_PICMGMT_DATA) >> SHIFT_MTX_MSG_PICMGMT_DATA; 1073e26d82700f9514cc175d2b54733ebdeb8824922ehding switch (eFrameType) { 1074e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_INTRA_IDR: 1075e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP, 1076e26d82700f9514cc175d2b54733ebdeb8824922ehding "\t\teFrameType=IMG_INTRA_IDR\n"); 1077e26d82700f9514cc175d2b54733ebdeb8824922ehding break; 1078e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_INTRA_FRAME: 1079e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP, 1080e26d82700f9514cc175d2b54733ebdeb8824922ehding "\t\teFrameType=IMG_INTRA_FRAME\n"); 1081e26d82700f9514cc175d2b54733ebdeb8824922ehding break; 1082e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_INTER_P: 1083e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP, 1084e26d82700f9514cc175d2b54733ebdeb8824922ehding "\t\teFrameType=IMG_INTER_P\n"); 1085e26d82700f9514cc175d2b54733ebdeb8824922ehding break; 1086e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_INTER_B: 1087e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP, 1088e26d82700f9514cc175d2b54733ebdeb8824922ehding "\t\teFrameType=IMG_INTER_B\n"); 1089e26d82700f9514cc175d2b54733ebdeb8824922ehding break; 1090e26d82700f9514cc175d2b54733ebdeb8824922ehding } 10918e9a21e730449c10cac6e6f69d255611c93f63c2hding break; 1092e26d82700f9514cc175d2b54733ebdeb8824922ehding case IMG_PICMGMT_EOS: 1093e26d82700f9514cc175d2b54733ebdeb8824922ehding ui32FrameCount = (data & MASK_MTX_MSG_PICMGMT_DATA) >> SHIFT_MTX_MSG_PICMGMT_DATA; 1094e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP, 1095e26d82700f9514cc175d2b54733ebdeb8824922ehding "\t\tui32FrameCount=%d\n", ui32FrameCount); 1096e26d82700f9514cc175d2b54733ebdeb8824922ehding break; 1097e26d82700f9514cc175d2b54733ebdeb8824922ehding default: 1098e26d82700f9514cc175d2b54733ebdeb8824922ehding break; 10998e9a21e730449c10cac6e6f69d255611c93f63c2hding } 1100e26d82700f9514cc175d2b54733ebdeb8824922ehding drv_debug_msg(VIDEO_ENCODE_PDUMP,"\n\n"); 11018e9a21e730449c10cac6e6f69d255611c93f63c2hding 11028e9a21e730449c10cac6e6f69d255611c93f63c2hding return 0; 11038e9a21e730449c10cac6e6f69d255611c93f63c2hding} 11048e9a21e730449c10cac6e6f69d255611c93f63c2hding 11058e9a21e730449c10cac6e6f69d255611c93f63c2hding 11068e9a21e730449c10cac6e6f69d255611c93f63c2hdingstatic char * cmd2str(int cmdid) 11078e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 11088e9a21e730449c10cac6e6f69d255611c93f63c2hding switch (cmdid) { 1109e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_NULL: return "MTX_CMDID_NULL"; 1110e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_SHUTDOWN: return "MTX_CMDID_SHUTDOWN"; 11118e9a21e730449c10cac6e6f69d255611c93f63c2hding // Video Commands 1112e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_DO_HEADER: return "MTX_CMDID_DO_HEADER"; 11138e9a21e730449c10cac6e6f69d255611c93f63c2hding case MTX_CMDID_ENCODE_FRAME:return "MTX_CMDID_ENCODE_FRAME"; 1114e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_START_FRAME: return "MTX_CMDID_START_FRAME"; 1115e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_ENCODE_SLICE:return "MTX_CMDID_ENCODE_SLICE"; 1116e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_END_FRAME: return "MTX_CMDID_END_FRAME"; 1117e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_SETVIDEO: return "MTX_CMDID_SETVIDEO"; 1118e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_GETVIDEO: return "MTX_CMDID_GETVIDEO"; 1119e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_PICMGMT: return "MTX_CMDID_PICMGMT"; 1120e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_RC_UPDATE: return "MTX_CMDID_RC_UPDATE"; 1121e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_PROVIDE_SOURCE_BUFFER:return "MTX_CMDID_PROVIDE_SOURCE_BUFFER"; 1122e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_PROVIDE_REF_BUFFER: return "MTX_CMDID_PROVIDE_REF_BUFFER"; 1123e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_PROVIDE_CODED_BUFFER: return "MTX_CMDID_PROVIDE_CODED_BUFFER"; 1124e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_ABORT: return "MTX_CMDID_ABORT"; 11258e9a21e730449c10cac6e6f69d255611c93f63c2hding // JPEG commands 1126e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_SETQUANT: return "MTX_CMDID_SETQUANT"; 1127e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_SETUP_INTERFACE: return "MTX_CMDID_SETUP_INTERFACE"; 1128e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_ISSUEBUFF: return "MTX_CMDID_ISSUEBUFF"; 1129e26d82700f9514cc175d2b54733ebdeb8824922ehding case MTX_CMDID_SETUP: return "MTX_CMDID_SETUP"; 11308e9a21e730449c10cac6e6f69d255611c93f63c2hding case MTX_CMDID_ENDMARKER: 11318e9a21e730449c10cac6e6f69d255611c93f63c2hding default: 11328e9a21e730449c10cac6e6f69d255611c93f63c2hding return "Invalid Command (%d)"; 11338e9a21e730449c10cac6e6f69d255611c93f63c2hding } 11348e9a21e730449c10cac6e6f69d255611c93f63c2hding} 11358e9a21e730449c10cac6e6f69d255611c93f63c2hding 1136dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng_H264ES_trace_seq_params(VAEncSequenceParameterBufferH264 *psTraceSeqParams) 11378e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 1138dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: level_idc = 0x%08x\n", __FUNCTION__, psTraceSeqParams->level_idc); 1139dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: max_num_ref_frames = 0x%08x\n", __FUNCTION__, psTraceSeqParams->max_num_ref_frames); 1140dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: intra_idr_period = 0x%08x\n", __FUNCTION__, psTraceSeqParams->intra_idr_period); 1141dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: intra_period = 0x%08x\n", __FUNCTION__, psTraceSeqParams->intra_period); 1142dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: ip_period = 0x%08x\n", __FUNCTION__, psTraceSeqParams->ip_period); 1143dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: bits_per_second = 0x%08x\n", __FUNCTION__, psTraceSeqParams->bits_per_second); 1144dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1145dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: frame_cropping_flag = 0x%08x\n", __FUNCTION__, psTraceSeqParams->frame_cropping_flag); 1146dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: frame_crop_left_offset = 0x%08x\n", __FUNCTION__, psTraceSeqParams->frame_crop_left_offset); 1147dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: frame_crop_right_offset = 0x%08x\n", __FUNCTION__, psTraceSeqParams->frame_crop_right_offset); 1148dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: frame_crop_top_offset = 0x%08x\n", __FUNCTION__, psTraceSeqParams->frame_crop_top_offset); 1149dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL,"%s: frame_crop_bottom_offset = 0x%08x\n", __FUNCTION__, psTraceSeqParams->frame_crop_bottom_offset); 1150dd0a0b792078d587a2e266f146ccd287c39a742dedward lin return; 1151dd0a0b792078d587a2e266f146ccd287c39a742dedward lin} 11528e9a21e730449c10cac6e6f69d255611c93f63c2hding 11538e9a21e730449c10cac6e6f69d255611c93f63c2hding 1154dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng_H264ES_trace_pic_params(VAEncPictureParameterBufferH264 *psTracePicParams) 1155dd0a0b792078d587a2e266f146ccd287c39a742dedward lin{ 1156dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: CurrPic.picture_id = 0x%08x\n",__FUNCTION__, psTracePicParams->CurrPic.picture_id); 1157dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: coded_buf = 0x%08x\n",__FUNCTION__, psTracePicParams->coded_buf); 1158dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1159dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ReferenceFrames[0] = 0x%08x\n",__FUNCTION__, psTracePicParams->ReferenceFrames[0].picture_id); 1160dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ReferenceFrames[1] = 0x%08x\n",__FUNCTION__, psTracePicParams->ReferenceFrames[1].picture_id); 1161dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ReferenceFrames[2] = 0x%08x\n",__FUNCTION__, psTracePicParams->ReferenceFrames[2].picture_id); 1162dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ReferenceFrames[3] = 0x%08x\n",__FUNCTION__, psTracePicParams->ReferenceFrames[3].picture_id); 1163dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1164dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: pic_fields = 0x%08x\n",__FUNCTION__, psTracePicParams->pic_fields.value); 1165dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: pic_init_qp = 0x%08x\n",__FUNCTION__, psTracePicParams->pic_init_qp); 1166dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: last_picture = 0x%08x\n",__FUNCTION__, psTracePicParams->last_picture); 1167dd0a0b792078d587a2e266f146ccd287c39a742dedward lin return; 11688e9a21e730449c10cac6e6f69d255611c93f63c2hding} 1169e26d82700f9514cc175d2b54733ebdeb8824922ehding 1170e26d82700f9514cc175d2b54733ebdeb8824922ehding 1171dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng_H264ES_trace_slice_params(VAEncSliceParameterBufferH264 *psTraceSliceParams) 1172dd0a0b792078d587a2e266f146ccd287c39a742dedward lin{ 1173dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: disable_deblocking_filter_idc = 0x%08x\n",__FUNCTION__, psTraceSliceParams->disable_deblocking_filter_idc); 1174dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: macroblock_address = 0x%08x\n",__FUNCTION__, psTraceSliceParams->macroblock_address); 1175dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: num_macroblocks = 0x%08x\n",__FUNCTION__, psTraceSliceParams->num_macroblocks); 1176dd0a0b792078d587a2e266f146ccd287c39a742dedward lin return; 1177dd0a0b792078d587a2e266f146ccd287c39a742dedward lin} 1178e26d82700f9514cc175d2b54733ebdeb8824922ehding 1179dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng_H264ES_trace_misc_rc_params(VAEncMiscParameterRateControl *psTraceMiscRcParams) 1180dd0a0b792078d587a2e266f146ccd287c39a742dedward lin{ 1181dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s bits_per_second = 0x%08x\n", __FUNCTION__, psTraceMiscRcParams->bits_per_second); 1182dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s window_size = 0x%08x\n", __FUNCTION__, psTraceMiscRcParams->window_size); 1183dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s initial_qp = 0x%08x\n", __FUNCTION__, psTraceMiscRcParams->initial_qp); 1184dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s min_qp = 0x%08x\n", __FUNCTION__, psTraceMiscRcParams->min_qp); 1185dd0a0b792078d587a2e266f146ccd287c39a742dedward lin return; 1186dd0a0b792078d587a2e266f146ccd287c39a742dedward lin} 1187e26d82700f9514cc175d2b54733ebdeb8824922ehding 1188dd0a0b792078d587a2e266f146ccd287c39a742dedward lin/*********************************************************************/ 1189dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng_trace_seq_header_params(H264_SEQUENCE_HEADER_PARAMS *psSHParams) 1190dd0a0b792078d587a2e266f146ccd287c39a742dedward lin{ 1191dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ucProfile = %x\n", __FUNCTION__, psSHParams->ucProfile); 1192dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ucLevel = %x\n", __FUNCTION__, psSHParams->ucLevel); 1193dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ucWidth_in_mbs_minus1 = %x\n", __FUNCTION__, psSHParams->ucWidth_in_mbs_minus1); 1194dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ucHeight_in_maps_units_minus1 = %x\n", __FUNCTION__, psSHParams->ucHeight_in_maps_units_minus1); 1195dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s log2_max_pic_order_cnt = %x\n", __FUNCTION__, psSHParams->log2_max_pic_order_cnt); 1196dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s max_num_ref_frames = %x\n", __FUNCTION__, psSHParams->max_num_ref_frames); 1197dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s gaps_in_frame_num_value = %x\n", __FUNCTION__, psSHParams->gaps_in_frame_num_value); 1198dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ucFrame_mbs_only_flag = %x\n", __FUNCTION__, psSHParams->ucFrame_mbs_only_flag); 1199dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s VUI_Params_Present = %x\n", __FUNCTION__, psSHParams->VUI_Params_Present); 1200dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s seq_scaling_matrix_present_flag = %x\n", __FUNCTION__, psSHParams->seq_scaling_matrix_present_flag); 1201dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s bUseDefaultScalingList = %x\n", __FUNCTION__, psSHParams->bUseDefaultScalingList); 1202dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s bIsLossless = %x\n", __FUNCTION__, psSHParams->bIsLossless); 1203dd0a0b792078d587a2e266f146ccd287c39a742dedward lin if (psSHParams->VUI_Params_Present) { 1204dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s Time_Scale = %x\n", __FUNCTION__, psSHParams->VUI_Params.Time_Scale); //!< Time scale as defined in the H.264 specification 1205dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s bit_rate_value_minus1 = %x\n", __FUNCTION__, psSHParams->VUI_Params.bit_rate_value_minus1); //!< An inter framebitrate/64)-1 1206dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s cbp_size_value_minus1 = %x\n", __FUNCTION__, psSHParams->VUI_Params.cbp_size_value_minus1); //!< An inter frame(bitrate*1.5)/16 1207dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s CBR = %x\n", __FUNCTION__, psSHParams->VUI_Params.CBR); //!< CBR as defined in the H.264 specification 1208dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s initial_cpb_removal = %x\n", __FUNCTION__, psSHParams->VUI_Params.initial_cpb_removal_delay_length_minus1); //!< as defined in the H.264 specification 1209dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s cpb_removal_delay_length_minus1 = %x\n", __FUNCTION__, psSHParams->VUI_Params.cpb_removal_delay_length_minus1); //!< as defined in the H.264 specification 1210dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s dpb_output_delay_length_minus1 = %x\n", __FUNCTION__, psSHParams->VUI_Params.dpb_output_delay_length_minus1); //!< as defined in the H.264 specification 1211dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s time_offset_length = %x\n", __FUNCTION__, psSHParams->VUI_Params.time_offset_length); //!< as defined in the H.264 specification 1212dd0a0b792078d587a2e266f146ccd287c39a742dedward lin } 1213dd0a0b792078d587a2e266f146ccd287c39a742dedward lin} 1214e26d82700f9514cc175d2b54733ebdeb8824922ehding 1215dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng_trace_pic_header_params(H264_PICTURE_HEADER_PARAMS *psSHParams) 1216dd0a0b792078d587a2e266f146ccd287c39a742dedward lin{ 1217dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s pic_parameter_set_id; = %x\n", __FUNCTION__, psSHParams->pic_parameter_set_id); 1218dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s seq_parameter_set_id; = %x\n", __FUNCTION__, psSHParams->seq_parameter_set_id); 1219dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s entropy_coding_mode_flag; = %x\n", __FUNCTION__, psSHParams->entropy_coding_mode_flag); 1220dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s weighted_pred_flag; = %x\n", __FUNCTION__, psSHParams->weighted_pred_flag); 1221dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s weighted_bipred_idc; = %x\n", __FUNCTION__, psSHParams->weighted_bipred_idc); 1222dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s chroma_qp_index_offset; = %x\n", __FUNCTION__, psSHParams->chroma_qp_index_offset); 1223dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s constrained_intra_pred_flag; = %x\n", __FUNCTION__, psSHParams->constrained_intra_pred_flag); 1224dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s transform_8x8_mode_flag; = %x\n", __FUNCTION__, psSHParams->transform_8x8_mode_flag); 1225dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s pic_scaling_matrix_present_flag = %x\n", __FUNCTION__, psSHParams->pic_scaling_matrix_present_flag); 1226dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s bUseDefaultScalingList; = %x\n", __FUNCTION__, psSHParams->bUseDefaultScalingList); 1227dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s second_chroma_qp_index_offset; = %x\n", __FUNCTION__, psSHParams->second_chroma_qp_index_offset); 12288e9a21e730449c10cac6e6f69d255611c93f63c2hding 1229dd0a0b792078d587a2e266f146ccd287c39a742dedward lin} 12308e9a21e730449c10cac6e6f69d255611c93f63c2hding 1231dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng_trace_slice_header_params(H264_SLICE_HEADER_PARAMS *psSlHParams) 12328e9a21e730449c10cac6e6f69d255611c93f63c2hding{ 1233dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: start addr = 0x%08x\n", __FUNCTION__, psSlHParams); 1234dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.ui8Start_Code_Prefix_Size_Bytes 0x%08x\n", psSlHParams->ui8Start_Code_Prefix_Size_Bytes); 1235dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.SliceFrame_Type 0x%08x\n", psSlHParams->SliceFrame_Type); 1236dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.First_MB_Address 0x%08x\n", psSlHParams->First_MB_Address); 1237dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.Frame_Num_DO 0x%08x\n", psSlHParams->Frame_Num_DO); 1238dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.Idr_Pic_Id 0x%08x\n", psSlHParams->Idr_Pic_Id); 1239dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.log2_max_pic_order_cnt 0x%08x\n", psSlHParams->log2_max_pic_order_cnt); 1240dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.Picture_Num_DO 0x%08x\n", psSlHParams->Picture_Num_DO); 1241dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.Disable_Deblocking_Filter_Idc 0x%08x\n", psSlHParams->Disable_Deblocking_Filter_Idc); 1242dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.bPiCInterlace 0x%08x\n", psSlHParams->bPiCInterlace); 1243dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.bFieldType 0x%08x\n", psSlHParams->bFieldType); 1244dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.bReferencePicture 0x%08x\n", psSlHParams->bReferencePicture); 1245dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.iDebAlphaOffsetDiv2 0x%08x\n", psSlHParams->iDebAlphaOffsetDiv2); 1246dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.iDebBetaOffsetDiv2 0x%08x\n", psSlHParams->iDebBetaOffsetDiv2); 1247dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.direct_spatial_mv_pred_flag 0x%08x\n", psSlHParams->direct_spatial_mv_pred_flag); 1248dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.num_ref_idx_l0_active_minus1 0x%08x\n", psSlHParams->num_ref_idx_l0_active_minus1); 1249dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1250dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.diff_ref_pic_num[0] 0x%08x\n", psSlHParams->diff_ref_pic_num[0]); 1251dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.diff_ref_pic_num[1] 0x%08x\n", psSlHParams->diff_ref_pic_num[1]); 1252dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.weighted_pred_flag 0x%08x\n", psSlHParams->weighted_pred_flag); 1253dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.weighted_bipred_idc 0x%08x\n", psSlHParams->weighted_bipred_idc); 1254dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1255dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.luma_log2_weight_denom 0x%08x\n", psSlHParams->luma_log2_weight_denom); 1256dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chroma_log2_weight_denom 0x%08x\n", psSlHParams->chroma_log2_weight_denom); 1257dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.luma_weight_l0_flag[0] 0x%08x\n", psSlHParams->luma_weight_l0_flag[0]); 1258dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.luma_weight_l0_flag[1] 0x%08x\n", psSlHParams->luma_weight_l0_flag[1]); 1259dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1260dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.SlHParams.luma_weight_l0[0] 0x%08x\n", psSlHParams->luma_weight_l0[0]); 1261dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.SlHParams.luma_weight_l0[1] 0x%08x\n", psSlHParams->luma_weight_l0[1]); 1262dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.luma_offset_l0[0] 0x%08x\n", psSlHParams->luma_offset_l0[0]); 1263dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.luma_offset_l0[1] 0x%08x\n", psSlHParams->luma_offset_l0[1]); 1264dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1265dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chroma_weight_l0_flag[0] 0x%08x\n", psSlHParams->chroma_weight_l0_flag[0]); 1266dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chroma_weight_l0_flag[1] 0x%08x\n", psSlHParams->chroma_weight_l0_flag[1]); 1267dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaB_weight_l0[0] 0x%08x\n", psSlHParams->chromaB_weight_l0[0]); 1268dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaB_offset_l0[0] 0x%08x\n", psSlHParams->chromaB_offset_l0[0]); 1269dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaR_weight_l0[0] 0x%08x\n", psSlHParams->chromaR_weight_l0[0]); 1270dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaR_offset_l0[0] 0x%08x\n", psSlHParams->chromaR_offset_l0[0]); 1271dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaB_weight_l0[1] 0x%08x\n", psSlHParams->chromaB_weight_l0[1]); 1272dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaB_offset_l0[1] 0x%08x\n", psSlHParams->chromaB_offset_l0[1]); 1273dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaR_weight_l0[1] 0x%08x\n", psSlHParams->chromaR_weight_l0[1]); 1274dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.chromaR_offset_l0[1] 0x%08x\n", psSlHParams->chromaR_offset_l0[1]); 1275dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1276dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.ui16MvcViewIdx 0x%08x\n", psSlHParams->ui16MvcViewIdx); 1277dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.bIsLongTermRef 0x%08x\n", psSlHParams->bIsLongTermRef); 1278dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.uLongTermRefNum 0x%08x\n", psSlHParams->uLongTermRefNum); 1279dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.bRefIsLongTermRef[0] 0x%08x\n", psSlHParams->bRefIsLongTermRef[0]); 1280dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.bRefIsLongTermRef[1] 0x%08x\n", psSlHParams->bRefIsLongTermRef[1]); 1281dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.uRefLongTermRefNum[0] 0x%08x\n", psSlHParams->uRefLongTermRefNum[0]); 1282dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "SlHParams.uRefLongTermRefNum[1] 0x%08x\n", psSlHParams->uRefLongTermRefNum[1]); 1283dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: end \n", __FUNCTION__); 1284dd0a0b792078d587a2e266f146ccd287c39a742dedward lin} 12858e9a21e730449c10cac6e6f69d255611c93f63c2hding 1286dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng__trace_seqconfig( 1287dd0a0b792078d587a2e266f146ccd287c39a742dedward lin IMG_BOOL bIsBPicture, 1288dd0a0b792078d587a2e266f146ccd287c39a742dedward lin IMG_BOOL bFieldMode, 1289dd0a0b792078d587a2e266f146ccd287c39a742dedward lin IMG_UINT8 ui8SwapChromas, 1290dd0a0b792078d587a2e266f146ccd287c39a742dedward lin IMG_BOOL32 ui32FrameStoreFormat, 1291dd0a0b792078d587a2e266f146ccd287c39a742dedward lin IMG_UINT8 uiDeblockIDC) 1292dd0a0b792078d587a2e266f146ccd287c39a742dedward lin{ 1293dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(0, TOPAZHP_CR_TEMPORAL_PIC0_BELOW_IN_VALID) ); 1294dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(0, TOPAZHP_CR_TEMPORAL_PIC1_BELOW_IN_VALID) ); 1295dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(0, TOPAZHP_CR_ABOVE_OUT_OF_SLICE_VALID) ); 1296dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(1, TOPAZHP_CR_WRITE_TEMPORAL_PIC0_BELOW_VALID) ); 1297dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(0, TOPAZHP_CR_REF_PIC0_VALID) ); 1298dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(0, TOPAZHP_CR_REF_PIC1_VALID) ); 1299dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(!bIsBPicture, TOPAZHP_CR_REF_PIC1_EQUAL_PIC0) ); 1300dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(bFieldMode ? 1 : 0 , TOPAZHP_CR_FIELD_MODE) ); 1301dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(ui8SwapChromas, TOPAZHP_CR_FRAME_STORE_CHROMA_SWAP) ); 1302dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(ui32FrameStoreFormat, TOPAZHP_CR_FRAME_STORE_FORMAT) ); 1303dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(TOPAZHP_CR_ENCODER_STANDARD_H264, TOPAZHP_CR_ENCODER_STANDARD) ); 1304dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s ui32SeqConfig 0x%08x\n", __FUNCTION__, F_ENCODE(uiDeblockIDC == 1 ? 0 : 1, TOPAZHP_CR_DEBLOCK_ENABLE)); 1305dd0a0b792078d587a2e266f146ccd287c39a742dedward lin} 13068e9a21e730449c10cac6e6f69d255611c93f63c2hding 1307dd0a0b792078d587a2e266f146ccd287c39a742dedward linvoid tng__trace_seq_header(void* pointer) 1308dd0a0b792078d587a2e266f146ccd287c39a742dedward lin{ 1309dd0a0b792078d587a2e266f146ccd287c39a742dedward lin context_ENC_p ctx = NULL; 1310dd0a0b792078d587a2e266f146ccd287c39a742dedward lin if (pointer == NULL) 1311dd0a0b792078d587a2e266f146ccd287c39a742dedward lin return ; 13128e9a21e730449c10cac6e6f69d255611c93f63c2hding 1313dd0a0b792078d587a2e266f146ccd287c39a742dedward lin ctx = (context_ENC_p)pointer; 1314dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1315dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ucProfile = %d\n", __FUNCTION__, ctx->ui8ProfileIdc); 1316dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ucLevel = %d\n", __FUNCTION__, ctx->ui8LevelIdc); 1317dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ui16Width = %d\n", __FUNCTION__, ctx->ui16Width); 1318dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ui16PictureHeight = %d\n", __FUNCTION__, ctx->ui16PictureHeight); 1319dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ui32CustomQuantMask = %d\n", __FUNCTION__, ctx->ui32CustomQuantMask); 1320dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ui8FieldCount = %d\n", __FUNCTION__, ctx->ui8FieldCount); 1321dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: ui8MaxNumRefFrames = %d\n", __FUNCTION__, ctx->ui8MaxNumRefFrames); 1322dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: bPpsScaling = %d\n", __FUNCTION__, ctx->bPpsScaling); 1323dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: bUseDefaultScalingList = %d\n", __FUNCTION__, ctx->bUseDefaultScalingList); 1324dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: bEnableLossless = %d\n", __FUNCTION__, ctx->bEnableLossless); 1325dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: bArbitrarySO = %d\n", __FUNCTION__, ctx->bArbitrarySO); 1326dd0a0b792078d587a2e266f146ccd287c39a742dedward lin drv_debug_msg(VIDEO_DEBUG_GENERAL, "%s: vui_flag = %d\n", __FUNCTION__, ctx->sVuiParams.vui_flag); 13278e9a21e730449c10cac6e6f69d255611c93f63c2hding} 1328dd0a0b792078d587a2e266f146ccd287c39a742dedward lin 1329