• Home
  • Raw
  • Download

Lines Matching refs:pContext

517 IMG_ERRORCODE AllocateCodedDataBuffers(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext)  in AllocateCodedDataBuffers()  argument
521 for (ui8Loop = 0 ; ui8Loop < pContext->sScan_Encode_Info.ui8NumberOfCodedBuffers; ui8Loop ++) in AllocateCodedDataBuffers()
522 if (pContext->sScan_Encode_Info.aBufferTable[ui8Loop].pMemInfo == NULL) { in AllocateCodedDataBuffers()
523pContext->sScan_Encode_Info.aBufferTable[ui8Loop].ui32DataBufferSizeBytes = ((DATA_BUFFER_SIZE(pCo… in AllocateCodedDataBuffers()
524 pContext->sScan_Encode_Info.aBufferTable[ui8Loop].ui32DataBufferUsedBytes = 0; in AllocateCodedDataBuffers()
525pContext->sScan_Encode_Info.aBufferTable[ui8Loop].i8MTXNumber = 0; // Indicates buffer is idle in AllocateCodedDataBuffers()
526pContext->sScan_Encode_Info.aBufferTable[ui8Loop].ui16ScanNumber = 0; // Indicates buffer is idle in AllocateCodedDataBuffers()
527 pContext->sScan_Encode_Info.aBufferTable[ui8Loop].pMemInfo = in AllocateCodedDataBuffers()
528 …(unsigned char *)pContext->jpeg_coded_buf.pMemInfo + PNW_JPEG_HEADER_MAX_SIZE + ui8Loop * pContext in AllocateCodedDataBuffers()
545 IMG_UINT32 FreeCodedDataBuffers(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext)
548 ui8Loop = pContext->sScan_Encode_Info.ui8NumberOfCodedBuffers;
551 if (pContext->sScan_Encode_Info.aBufferTable[ui8Loop].pMemInfo != NULL) {
553 pContext->sScan_Encode_Info.aBufferTable[ui8Loop].pMemInfo = NULL;
562 void SetupMCUDetails(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, in SetupMCUDetails() argument
574 pMCUComp = &pContext->pMTXSetup->MCUComponent[uiComponentNumber]; in SetupMCUDetails()
597 IMG_ERRORCODE InitializeJpegEncode(TOPAZSC_JPEG_ENCODER_CONTEXT * pContext, object_surface_p __mayb… in InitializeJpegEncode() argument
612 context_ENC_p ctx = (context_ENC_p)pContext->ctx; in InitializeJpegEncode()
622 ui16_height = pContext->ui32OutputHeight; in InitializeJpegEncode()
623 ui16_width = pContext->ui32OutputWidth; in InitializeJpegEncode()
625 switch (pContext->eFormat) { in InitializeJpegEncode()
669 for (uc_i = 0; uc_i < pContext->pMTXSetup->ui32ComponentsInScan; uc_i++) { in InitializeJpegEncode()
679 switch (pContext->eFormat) { in InitializeJpegEncode()
699 switch (ISCHROMAINTERLEAVED(pContext->eFormat)) { in InitializeJpegEncode()
720 SetupMCUDetails(pContext, uc_i , uc_h_scale, uc_v_scale, ui16_comp_height, ui16_comp_width); in InitializeJpegEncode()
769 IMG_UINT32 Legacy_EncodeMarkerSegment(LEGACY_JPEG_ENCODER_CONTEXT *pContext,
787 fPutBitsToBuffer(&s_streamW, 1, pContext->pvLowLevelEncContext->Qmatrix[0][gZigZag[uc_i]]);
796 fPutBitsToBuffer(&s_streamW, 1, pContext->pvLowLevelEncContext->Qmatrix[1][gZigZag[uc_i]]);
852 IMG_UINT32 EncodeMarkerSegment(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, in EncodeMarkerSegment() argument
872 … fPutBitsToBuffer(&s_streamW, 1, pContext->psTablesBlock->aui8LumaQuantParams[gZigZag[uc_i]]); in EncodeMarkerSegment()
882 … fPutBitsToBuffer(&s_streamW, 1, pContext->psTablesBlock->aui8ChromaQuantParams[gZigZag[uc_i]]); in EncodeMarkerSegment()
916 if (pContext->sScan_Encode_Info.ui16CScan > 1) { in EncodeMarkerSegment()
920 …fPutBitsToBuffer(&s_streamW, 2, pContext->sScan_Encode_Info.ui32NumberMCUsToEncodePerScan); // Res… in EncodeMarkerSegment()
936 IMG_UINT32 Legacy_JPGEncodeMarker(/*in */ LEGACY_JPEG_ENCODER_CONTEXT *pContext ,
944 if (pContext->eCurrentActive != LEGACY_JPEG_API_CURRENT_ACTIVE_ENCODE) {
949 *pui32BytesWritten += Legacy_EncodeMarkerSegment(pContext, pui8BitStreamBuffer);
965 IMG_UINT32 JPGEncodeMarker(/*in */ TOPAZSC_JPEG_ENCODER_CONTEXT *pContext , in JPGEncodeMarker() argument
974 …*pui32BytesWritten += EncodeMarkerSegment(pContext, pui8BitStreamBuffer + *pui32BytesWritten, bInc… in JPGEncodeMarker()
1078 IMG_UINT32 EncodeFrameHeader(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, in EncodeFrameHeader() argument
1084 uc_num_comp_in_img = pContext->pMTXSetup->ui32ComponentsInScan; in EncodeFrameHeader()
1100 fPutBitsToBuffer(&ps_streamW, 2, pContext->ui32OutputHeight); in EncodeFrameHeader()
1102 fPutBitsToBuffer(&ps_streamW, 2, pContext->ui32OutputWidth); in EncodeFrameHeader()
1109 …fPutBitsToBuffer(&ps_streamW, 1, ((pContext->pMTXSetup->MCUComponent[0].ui32WidthBlocks >> 3) << 4… in EncodeFrameHeader()
1113 if (pContext->pMTXSetup->ui32DataInterleaveStatus < C_INTERLEAVE) { //Chroma planar in EncodeFrameHeader()
1116 …fPutBitsToBuffer(&ps_streamW, 1, ((pContext->pMTXSetup->MCUComponent[1].ui32WidthBlocks >> 3) << 4… in EncodeFrameHeader()
1120 …fPutBitsToBuffer(&ps_streamW, 1, ((pContext->pMTXSetup->MCUComponent[2].ui32WidthBlocks >> 3) << 4… in EncodeFrameHeader()
1122 … } else if (pContext->pMTXSetup->ui32DataInterleaveStatus == C_INTERLEAVE) { // Chroma Interleaved in EncodeFrameHeader()
1125 …fPutBitsToBuffer(&ps_streamW, 1, ((pContext->pMTXSetup->MCUComponent[1].ui32WidthBlocks >> 3) << 3… in EncodeFrameHeader()
1129 …fPutBitsToBuffer(&ps_streamW, 1, ((pContext->pMTXSetup->MCUComponent[2].ui32WidthBlocks >> 3) << 3… in EncodeFrameHeader()
1134 …fPutBitsToBuffer(&ps_streamW, 1, ((pContext->pMTXSetup->MCUComponent[1].ui32WidthBlocks >> 3) << 4… in EncodeFrameHeader()
1138 …fPutBitsToBuffer(&ps_streamW, 1, ((pContext->pMTXSetup->MCUComponent[2].ui32WidthBlocks >> 3) << 4… in EncodeFrameHeader()
1159 IMG_UINT32 Legacy_JPGEncodeHeader(/*in */ LEGACY_JPEG_ENCODER_CONTEXT *pContext,
1167 if (pContext->eCurrentActive != LEGACY_JPEG_API_CURRENT_ACTIVE_ENCODE) {
1172 *pui32BytesWritten += Legacy_EncodeFrameHeader(&pContext->JPEGEncoderParams,
1173 &pContext->sJPEGEncoderComp,
1187 IMG_UINT32 JPGEncodeHeader(/*in */ TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, in JPGEncodeHeader() argument
1195 *pui32BytesWritten += EncodeFrameHeader(pContext, pui8BitStreamBuffer + *pui32BytesWritten); in JPGEncodeHeader()
1214 IMG_UINT32 SetupIssueSetup(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, const IMG_UINT32 ui32ComponentsI… in SetupIssueSetup() argument
1220 context_ENC_p ctx = (context_ENC_p)pContext->ctx; in SetupIssueSetup()
1228 pContext->pMTXSetup->ui32ComponentsInScan = ui32ComponentsInScan; in SetupIssueSetup()
1229 pContext->pMTXSetup->ui32DataInterleaveStatus = ISCHROMAINTERLEAVED(pContext->eFormat); in SetupIssueSetup()
1230 pContext->pMTXSetup->ui32TableA = ui32TableA; in SetupIssueSetup()
1243 …RELOC_PIC_PARAMS_PNW(&pContext->pMTXSetup->ComponentPlane[0].ui32PhysAddr, srf_buf_offset , &pTFra… in SetupIssueSetup()
1244 switch (pContext->eFormat) { in SetupIssueSetup()
1247 RELOC_PIC_PARAMS_PNW(&pContext->pMTXSetup->ComponentPlane[1].ui32PhysAddr, in SetupIssueSetup()
1250 RELOC_PIC_PARAMS_PNW(&pContext->pMTXSetup->ComponentPlane[2].ui32PhysAddr, in SetupIssueSetup()
1258 RELOC_PIC_PARAMS_PNW(&pContext->pMTXSetup->ComponentPlane[1].ui32PhysAddr, in SetupIssueSetup()
1263 RELOC_PIC_PARAMS_PNW(&pContext->pMTXSetup->ComponentPlane[2].ui32PhysAddr, in SetupIssueSetup()
1270 RELOC_PIC_PARAMS_PNW(&pContext->pMTXSetup->ComponentPlane[2].ui32PhysAddr, in SetupIssueSetup()
1274 RELOC_PIC_PARAMS_PNW(&pContext->pMTXSetup->ComponentPlane[1].ui32PhysAddr, in SetupIssueSetup()
1280 drv_debug_msg(VIDEO_DEBUG_ERROR, " Not supported FOURCC %x!\n", pContext->eFormat); in SetupIssueSetup()
1286 …drv_debug_msg(VIDEO_DEBUG_GENERAL, "TOPAZ_PDUMP: ui32DataInterleaveStatus %x\n", pContext->pMTXSet… in SetupIssueSetup()
1287 …drv_debug_msg(VIDEO_DEBUG_GENERAL, "TOPAZ_PDUMP: ui32TableA %x \n", pContext->pMTXSetup->ui32Table… in SetupIssueSetup()
1288 …drv_debug_msg(VIDEO_DEBUG_GENERAL, "TOPAZ_PDUMP:ui32ComponentsInScan %x\n", pContext->pMTXSetup->u… in SetupIssueSetup()
1291 …i32Lp, pContext->pMTXSetup->ComponentPlane[i32Lp].ui32PhysAddr, pContext->pMTXSetup->ComponentPlan… in SetupIssueSetup()
1292pContext->pMTXSetup->MCUComponent[i32Lp].ui32WidthBlocks, pContext->pMTXSetup->MCUComponent[i32Lp]… in SetupIssueSetup()
1316 IMG_UINT32 Legacy_JPGEncodeSOSHeader(LEGACY_JPEG_ENCODER_CONTEXT *pContext, IMG_CODED_BUFFER *pCBuf…
1332 fPutBitsToBuffer(&s_streamW, 2, 6 + (pContext->JPEGEncoderParams.uc_num_comp_in_scan << 1));
1334 fPutBitsToBuffer(&s_streamW, 1, pContext->JPEGEncoderParams.uc_num_comp_in_scan);
1336 if (pContext->JPEGEncoderParams.uc_num_comp_in_scan > MAX_COMP_IN_SCAN)
1337 pContext->JPEGEncoderParams.uc_num_comp_in_scan = MAX_COMP_IN_SCAN;
1338 for (ui8Comp = 0; ui8Comp < pContext->JPEGEncoderParams.uc_num_comp_in_scan; ui8Comp++) {
1339 uc_comp_id = pContext->JPEGEncoderParams.puc_comp_id[ui8Comp];
1345 ui32TableIndex = pContext->sJPEGEncoderComp.CompIdtoIndex[uc_comp_id];
1353 …fPutBitsToBuffer(&s_streamW, 1, (pContext->sJPEGEncoderComp.puc_huff_table_id[ui32TableIndex] << 4…
1380 IMG_UINT32 JPGEncodeSOSHeader(/*in */ TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, in JPGEncodeSOSHeader() argument
1393 fPutBitsToBuffer(&s_streamW, 2, 6 + (pContext->pMTXSetup->ui32ComponentsInScan << 1)); in JPGEncodeSOSHeader()
1395 fPutBitsToBuffer(&s_streamW, 1, pContext->pMTXSetup->ui32ComponentsInScan); in JPGEncodeSOSHeader()
1396 for (ui8Comp = 0; ui8Comp < pContext->pMTXSetup->ui32ComponentsInScan; ui8Comp++) { in JPGEncodeSOSHeader()
1485 IMG_ERRORCODE SetupJPEGTables(TOPAZSC_JPEG_ENCODER_CONTEXT * pContext, IMG_CODED_BUFFER *pCBuffer, … in SetupJPEGTables() argument
1498 context_ENC_p ctx = (context_ENC_p)pContext->ctx; in SetupJPEGTables()
1501 pContext->pSourceSurface = pTFrame; in SetupJPEGTables()
1505 InitializeJpegEncode(pContext, pTFrame); in SetupJPEGTables()
1508 if (ISCHROMAINTERLEAVED(pContext->eFormat) > C_INTERLEAVE) in SetupJPEGTables()
1509pContext->sScan_Encode_Info.ui32NumberMCUsX = (pContext->pMTXSetup->MCUComponent[0].ui32XLimit + (… in SetupJPEGTables()
1511pContext->sScan_Encode_Info.ui32NumberMCUsX = (pContext->pMTXSetup->MCUComponent[0].ui32XLimit + ( in SetupJPEGTables()
1513pContext->sScan_Encode_Info.ui32NumberMCUsY = (pContext->pMTXSetup->MCUComponent[0].ui32YLimit + ( in SetupJPEGTables()
1514pContext->sScan_Encode_Info.ui32NumberMCUsToEncode = pContext->sScan_Encode_Info.ui32NumberMCUsX *… in SetupJPEGTables()
1516 pContext->sScan_Encode_Info.ui32NumberMCUsToEncodePerScan = in SetupJPEGTables()
1517 …JPEG_MCU_PER_SCAN(pContext->ui32OutputWidth, pContext->ui32OutputHeight, ctx->NumCores, pContext->… in SetupJPEGTables()
1520 pContext->sScan_Encode_Info.ui32NumberMCUsX, in SetupJPEGTables()
1521 pContext->sScan_Encode_Info.ui32NumberMCUsY); in SetupJPEGTables()
1522 …DEBUG_GENERAL, "Total MCU %d, per scan %d\n", pContext->sScan_Encode_Info.ui32NumberMCUsToEncode, in SetupJPEGTables()
1526 if (AllocateCodedDataBuffers(pContext) != IMG_ERR_OK) return IMG_ERR_MEMORY; in SetupJPEGTables()
1532 ((context_ENC_p)pContext->ctx)->obj_context, in SetupJPEGTables()
1542 switch (pContext->eFormat) { in SetupJPEGTables()
1544 pContext->pMTXSetup->ComponentPlane[0].ui32Stride = pTFrame->psb_surface->stride; in SetupJPEGTables()
1545pContext->pMTXSetup->ComponentPlane[1].ui32Stride = pContext->pMTXSetup->ComponentPlane[0].ui32Str… in SetupJPEGTables()
1546pContext->pMTXSetup->ComponentPlane[2].ui32Stride = pContext->pMTXSetup->ComponentPlane[0].ui32Str… in SetupJPEGTables()
1548 pContext->pMTXSetup->ComponentPlane[0].ui32Height = pTFrame->height; in SetupJPEGTables()
1549 pContext->pMTXSetup->ComponentPlane[1].ui32Height = pTFrame->height; in SetupJPEGTables()
1550 pContext->pMTXSetup->ComponentPlane[2].ui32Height = pTFrame->height; in SetupJPEGTables()
1568 pContext->pMTXSetup->ComponentPlane[0].ui32Stride = pTFrame->psb_surface->stride; in SetupJPEGTables()
1569pContext->pMTXSetup->ComponentPlane[1].ui32Stride = pContext->pMTXSetup->ComponentPlane[0].ui32Str… in SetupJPEGTables()
1570pContext->pMTXSetup->ComponentPlane[2].ui32Stride = pContext->pMTXSetup->ComponentPlane[0].ui32Str… in SetupJPEGTables()
1572 pContext->pMTXSetup->ComponentPlane[0].ui32Height = pTFrame->height; in SetupJPEGTables()
1573 pContext->pMTXSetup->ComponentPlane[1].ui32Height = pTFrame->height / 2; in SetupJPEGTables()
1574 pContext->pMTXSetup->ComponentPlane[2].ui32Height = pTFrame->height / 2; in SetupJPEGTables()
1592 pContext->pMTXSetup->ComponentPlane[0].ui32Stride = pTFrame->psb_surface->stride; in SetupJPEGTables()
1593pContext->pMTXSetup->ComponentPlane[1].ui32Stride = pContext->pMTXSetup->ComponentPlane[0].ui32Str… in SetupJPEGTables()
1594pContext->pMTXSetup->ComponentPlane[2].ui32Stride = pContext->pMTXSetup->ComponentPlane[0].ui32Str… in SetupJPEGTables()
1596 pContext->pMTXSetup->ComponentPlane[0].ui32Height = pTFrame->height; in SetupJPEGTables()
1597 pContext->pMTXSetup->ComponentPlane[1].ui32Height = pTFrame->height / 2; in SetupJPEGTables()
1598 pContext->pMTXSetup->ComponentPlane[2].ui32Height = pTFrame->height / 2; in SetupJPEGTables()
1607 SetupIssueSetup(pContext, pContext->pMTXSetup->ui32ComponentsInScan, ui8Planes, pTFrame, 0 , 1); in SetupJPEGTables()
1609 if (pContext->pMTXSetup->ui32ComponentsInScan > MAX_COMP_IN_SCAN) { in SetupJPEGTables()
1613 …if ((pCBuffer->ui32Size - pCBuffer->ui32BytesWritten) < 9 + 6 + (4 *(IMG_UINT32)pContext->pMTXSetu… in SetupJPEGTables()
1618 for (ui16Lp = 0; ui16Lp < pContext->sScan_Encode_Info.ui8NumberOfCodedBuffers; ui16Lp++) { in SetupJPEGTables()
1621pContext->sScan_Encode_Info.aBufferTable[ui16Lp].i8MTXNumber = 0; // Indicates buffer is idle in SetupJPEGTables()
1622pContext->sScan_Encode_Info.aBufferTable[ui16Lp].ui16ScanNumber = 0; // Indicates buffer is idle in SetupJPEGTables()
1624 pContext->sScan_Encode_Info.aBufferTable[ui16Lp].ui32DataBufferUsedBytes = 0; in SetupJPEGTables()
1627 pbh = (BUFFER_HEADER *)(pContext->sScan_Encode_Info.aBufferTable[ui16Lp].pMemInfo); in SetupJPEGTables()
1633 …for (pContext->sScan_Encode_Info.ui8MTXIdleCnt = 0; pContext->sScan_Encode_Info.ui8MTXIdleCnt < ct… in SetupJPEGTables()
1634pContext->sScan_Encode_Info.aui8MTXIdleTable[pContext->sScan_Encode_Info.ui8MTXIdleCnt] = pContext in SetupJPEGTables()
1640pContext->sScan_Encode_Info.ui16CScan = (pContext->sScan_Encode_Info.ui32NumberMCUsToEncode + (pCo… in SetupJPEGTables()
1641 pContext->sScan_Encode_Info.ui16ScansInImage = pContext->sScan_Encode_Info.ui16CScan; in SetupJPEGTables()
1643 pContext->sScan_Encode_Info.ui16SScan = pContext->sScan_Encode_Info.ui16CScan; in SetupJPEGTables()
1644 pContext->ui32InitialCBOffset = 0; in SetupJPEGTables()
1650 IMG_ERRORCODE Legacy_PrepareHeader(LEGACY_JPEG_ENCODER_CONTEXT * pContext, IMG_CODED_BUFFER *pCBuff…
1664 …rc = Legacy_JPGEncodeMarker(pContext, (IMG_UINT8 *) ui8OutputBuffer, &pCBuffer->ui32BytesWritten);
1667 …rc = Legacy_JPGEncodeHeader(pContext , (IMG_UINT8 *) ui8OutputBuffer , &pCBuffer->ui32BytesWritte…
1671 Legacy_JPGEncodeSOSHeader(pContext, pCBuffer);
1688 IMG_ERRORCODE PrepareHeader(TOPAZSC_JPEG_ENCODER_CONTEXT * pContext, IMG_CODED_BUFFER *pCBuffer, IM… in PrepareHeader() argument
1703 …rc = JPGEncodeMarker(pContext, (IMG_UINT8 *) ui8OutputBuffer, &pCBuffer->ui32BytesWritten, bInclu… in PrepareHeader()
1707 rc = JPGEncodeHeader(pContext , (IMG_UINT8 *) ui8OutputBuffer , &pCBuffer->ui32BytesWritten); in PrepareHeader()
1711 rc = JPGEncodeSOSHeader(pContext, (IMG_UINT8 *) ui8OutputBuffer, &pCBuffer->ui32BytesWritten); in PrepareHeader()
1731 IMG_ERRORCODE IssueBufferToHW(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, TOPAZSC_JPEG_BUFFER_INFO* pWr… in IssueBufferToHW() argument
1734 context_ENC_p ctx = (context_ENC_p)pContext->ctx; in IssueBufferToHW()
1745 pContext->sScan_Encode_Info.ui32CurMCUsOffset, in IssueBufferToHW()
1758 psBufferCmd->ui32CurrentMTXScanMCUPosition = pContext->sScan_Encode_Info.ui32CurMCUsOffset; in IssueBufferToHW()
1775 … ui16BCnt * pContext->ui32SizePerCodedBuffer + PNW_JPEG_HEADER_MAX_SIZE); in IssueBufferToHW()
1792 IMG_ERRORCODE SubmitScanToMTX(TOPAZSC_JPEG_ENCODER_CONTEXT *pContext, in SubmitScanToMTX() argument
1805 if (pContext->sScan_Encode_Info.ui16SScan == 0) { in SubmitScanToMTX()
1807 …ui32NoMCUsToEncode = pContext->sScan_Encode_Info.ui32NumberMCUsToEncode % pContext->sScan_Encode_I… in SubmitScanToMTX()
1808 …if (ui32NoMCUsToEncode == 0) ui32NoMCUsToEncode = pContext->sScan_Encode_Info.ui32NumberMCUsToE… in SubmitScanToMTX()
1810 ui32NoMCUsToEncode = pContext->sScan_Encode_Info.ui32NumberMCUsToEncodePerScan; in SubmitScanToMTX()
1813pContext->sScan_Encode_Info.aBufferTable[ui16BCnt].ui32DataBufferUsedBytes = ((BUFFER_HEADER*)(pCo… in SubmitScanToMTX()
1814 …IssueBufferToHW(pContext, &(pContext->sScan_Encode_Info.aBufferTable[ui16BCnt]), ui16BCnt, ui32NoM… in SubmitScanToMTX()
1816 …drv_debug_msg(VIDEO_DEBUG_GENERAL, "Submitting scan %i to MTX %i and Buffer %i\n", pContext->sScan… in SubmitScanToMTX()