Lines Matching defs:psPicParams
52 PIC_PARAMS *psPicParams,
714 PIC_PARAMS *psPicParams; /* PIC_PARAMS has been put in pnw_hostcode.h */
722 psPicParams = (PIC_PARAMS *)(cmdbuf->pic_params_p + ctx->pic_params_size * core);
724 memset(psPicParams, 0, sizeof(PIC_PARAMS));
732 memset(psPicParams, 0, (int)((unsigned char *)&psPicParams->sInParams - (unsigned char *)psPicParams));
766 psPicParams->SrcYStride = src_surface->psb_surface->stride;
770 psPicParams->SrcUVStride = src_surface->psb_surface->stride / 2;
771 psPicParams->SrcUVRowStride = src_surface->psb_surface->stride * 8 / 2;
775 psPicParams->SrcUVStride = src_surface->psb_surface->stride;
776 psPicParams->SrcUVRowStride = src_surface->psb_surface->stride * 8;
781 psPicParams->SrcYRowStride = src_surface->psb_surface->stride * 16;
782 /* psPicParams->SrcUVRowStride = src_surface->psb_surface->stride * 16 / 2; */
791 psPicParams->DstYStride = rec_surface->psb_surface->stride;
792 psPicParams->DstUVStride = rec_surface->psb_surface->stride;
794 psPicParams->DstYStride = rec_surface->psb_surface->stride;
795 psPicParams->DstUVStride = rec_surface->psb_surface->stride;
798 psPicParams->Width = ctx->Width;
799 psPicParams->Height = ctx->Height;
800 psPicParams->NumSlices = ctx->sRCParams.Slices;
802 psPicParams->IsPerSliceOutput = IMG_FALSE;
803 psPicParams->SearchHeight = min(MVEA_LRB_SEARCH_HEIGHT, psPicParams->Height);
804 psPicParams->SearchWidth = min(MVEA_LRB_SEARCH_WIDTH, psPicParams->Width);
807 psPicParams->Flags = 0;
813 psPicParams->Flags |= ISH264_FLAGS;
818 psPicParams->Flags |= ISH263_FLAGS;
823 psPicParams->Flags |= ISMPEG4_FLAGS;
833 psPicParams->Flags |= ISVBR_FLAGS;
836 psPicParams->Flags |= (ISVCM_FLAGS | ISCBR_FLAGS);
841 psPicParams->Flags |= ISCBR_FLAGS;
853 psPicParams->Flags |= SYNC_SEQUENCER;
858 psPicParams->Flags |= DISABLE_FRAME_SKIPPING;
863 psPicParams->Flags |= DISABLE_BIT_STUFFING;
883 psPicParams->Flags &= ~FIRST_FRAME;
885 memcpy(&psPicParams->sInParams, &ctx->in_params_cache, sizeof(IN_RC_PARAMS));
887 psPicParams->Flags |= ISRC_FLAGS;
888 psPicParams->Flags |= FIRST_FRAME;
891 psPicParams->sInParams.SeInitQP = ctx->sRCParams.InitialQp;
899 RELOC_PIC_PARAMS_PNW(&psPicParams->SrcYBase, srf_buf_offset, &src_surface->psb_surface->buf);
904 RELOC_PIC_PARAMS_PNW(&psPicParams->SrcUBase,
908 RELOC_PIC_PARAMS_PNW(&psPicParams->SrcVBase,
919 RELOC_PIC_PARAMS_PNW(&psPicParams->DstYBase, 0, &rec_surface->psb_surface->buf);
921 RELOC_PIC_PARAMS_PNW(&psPicParams->DstUVBase,
925 psPicParams->BelowParamsInBase,
929 RELOC_PIC_PARAMS_PNW(&psPicParams->BelowParamsOutBase,
933 RELOC_PIC_PARAMS_PNW(&psPicParams->AboveParamsBase,
937 RELOC_PIC_PARAMS_PNW(&psPicParams->CodedBase, ctx->coded_buf_per_slice * core, ctx->coded_buf->psb_buffer);
946 PIC_PARAMS *psPicParams = (PIC_PARAMS *)cmdbuf->pic_params_p;
954 psPicParams->Flags |= ISRC_FLAGS;
955 pnw__setup_rcdata(ctx, psPicParams, &ctx->sRCParams);
964 (unsigned char *)&psPicParams->sInParams,
966 psPicParamsTmp->Flags |= psPicParams->Flags;
970 memcpy(&ctx->in_params_cache, (unsigned char *)&psPicParams->sInParams, sizeof(IN_RC_PARAMS));
980 PIC_PARAMS *psPicParams = (PIC_PARAMS *)cmdbuf->pic_params_p;
998 pnw__update_rcdata(ctx, psPicParams, &ctx->sRCParams);
1000 psPicParams->sInParams.MinQPVal = ctx->sRCParams.MinQP;
1001 memcpy(&ctx->in_params_cache, (unsigned char *)&psPicParams->sInParams, sizeof(IN_RC_PARAMS));
1006 (unsigned char *)&psPicParams->sInParams, sizeof(IN_RC_PARAMS));
1014 drv_debug_msg(VIDEO_DEBUG_GENERAL, "sizeof in_params %d\n", sizeof(psPicParams->sInParams));
1015 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SrcYBase 0x%08x\n", psPicParams->SrcYBase);
1016 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SrcUBase 0x%08x\n", psPicParams->SrcUBase);
1017 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SrcVBase 0x%08x\n", psPicParams->SrcVBase);
1018 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->DstYBase 0x%08x\n", psPicParams->DstYBase);
1019 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->DstUVBase 0x%08x\n", psPicParams->DstUVBase);
1020 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SrcYStride 0x%08x\n", psPicParams->SrcYStride);
1021 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SrcUVStride 0x%08x\n", psPicParams->SrcUVStride);
1022 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SrcYRowStride 0x%08x\n", psPicParams->SrcYRowStride);
1023 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SrcUVRowStride 0x%08x\n", psPicParams->SrcUVRowStride);
1024 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->DstYStride 0x%08x\n", psPicParams->DstYStride);
1025 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->DstUVStride 0x%08x\n", psPicParams->DstUVStride);
1026 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->CodedBase 0x%08x\n", psPicParams->CodedBase);
1027 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->BelowParamsInBase 0x%08x\n", psPicParams->BelowParamsInBase);
1028 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->BelowParamsOutBase 0x%08x\n", psPicParams->BelowParamsOutBase);
1029 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->AboveParamsBase 0x%08x\n", psPicParams->AboveParamsBase);
1030 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->Width 0x%08x\n", psPicParams->Width);
1031 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->Height 0x%08x\n", psPicParams->Height);
1032 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->Flags 0x%08x\n", psPicParams->Flags);
1033 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SerachWidth 0x%08x\n", psPicParams->SearchWidth);
1034 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->SearchHeight 0x%08x\n", psPicParams->SearchHeight);
1035 drv_debug_msg(VIDEO_DEBUG_GENERAL, "PicParams->NumSlices 0x%08x\n", psPicParams->NumSlices);
1036 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->ClockDivBitrate %lld\n", psPicParams->ClockDivBitrate);
1037 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->MaxBufferMultClockDivBitrate %d\n",
1038 psPicParams->MaxBufferMultClockDivBitrate);
1039 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.SeInitQP %d\n", psPicParams->sInParams.SeInitQP);
1040 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.MinQPVal %d\n", psPicParams->sInParams.MinQPVal);
1041 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.MaxQPVal %d\n", psPicParams->sInParams.MaxQPVal);
1042 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.MBPerRow %d\n", psPicParams->sInParams.MBPerRow);
1043 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.MBPerFrm %d\n", psPicParams->sInParams.MBPerFrm);
1044 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.MBPerBU %d\n", psPicParams->sInParams.MBPerBU);
1045 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.BUPerFrm %d\n", psPicParams->sInParams.BUPerFrm);
1046 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.IntraPeriod %d\n", psPicParams->sInParams.IntraPeriod);
1047 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.BitsPerFrm %d\n", psPicParams->sInParams.BitsPerFrm);
1048 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.BitsPerBU %d\n", psPicParams->sInParams.BitsPerBU);
1049 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.BitsPerMB %d\n", psPicParams->sInParams.BitsPerMB);
1050 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.BitRate %d\n", psPicParams->sInParams.BitRate);
1051 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.BufferSize %d\n", psPicParams->sInParams.BufferSize);
1052 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.InitialLevel %d\n", psPicParams->sInParams.InitialLevel);
1053 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.InitialDelay %d\n", psPicParams->sInParams.InitialDelay);
1054 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.ScaleFactor %d\n", psPicParams->sInParams.ScaleFactor);
1055 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.VCMBitrateMargin %d\n", psPicParams->sInParams.VCMBitrateMargin);
1056 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.HalfFrameRate %d\n", psPicParams->sInParams.HalfFrameRate);
1057 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.FCode %d\n", psPicParams->sInParams.FCode);
1058 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.BitsPerGOP %d\n", psPicParams->sInParams.BitsPerGOP);
1059 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.AvQPVal %d\n", psPicParams->sInParams.AvQPVal);
1060 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.MyInitQP %d\n", psPicParams->sInParams.MyInitQP);
1061 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.ForeceSkipMargin %d\n", psPicParams->sInParams.ForeceSkipMargin);
1062 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.RCScaleFactor %d\n", psPicParams->sInParams.RCScaleFactor);
1063 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.TransferRate %d\n", psPicParams->sInParams.TransferRate);
1064 drv_debug_msg(VIDEO_DEBUG_GENERAL, "psPicParams->sInParams.MaxFrameSize %d\n", psPicParams->sInParams.MaxFrameSize);
1228 PIC_PARAMS *psPicParams,
1243 psPicParams->sInParams.IntraPeriod = psRCParams->IntraFreq;
1244 psPicParams->sInParams.BitRate = psRCParams->BitsPerSecond;
1245 psPicParams->sInParams.BitsPerFrm = (psRCParams->BitsPerSecond + psRCParams->FrameRate / 2) / psRCParams->FrameRate;
1246 psPicParams->sInParams.BitsPerGOP = (psRCParams->BitsPerSecond / psRCParams->FrameRate) * psRCParams->IntraFreq;
1247 psPicParams->sInParams.BitsPerBU = psPicParams->sInParams.BitsPerFrm / (4 * psPicParams->sInParams.BUPerFrm);
1248 psPicParams->sInParams.BitsPerMB = psPicParams->sInParams.BitsPerBU / psRCParams->BUSize;
1249 psPicParams->sInParams.TransferRate = psRCParams->BitsPerSecond / psRCParams->FrameRate;
1251 i32BufferSizeInFrames = psRCParams->BufferSize / psPicParams->sInParams.BitsPerFrm;
1265 psPicParams->sInParams.MaxQPVal = 51;
1266 psPicParams->sInParams.RCScaleFactor = 16;
1269 psPicParams->sInParams.MaxQPVal = 51;
1270 psPicParams->sInParams.RCScaleFactor = 16;
1279 psPicParams->sInParams.MinQPVal = (max(min(psPicParams->sInParams.MaxQPVal, i16TempQP), 0));
1287 psPicParams->sInParams.SeInitQP = (IMG_UINT8)(47 - 78.10 * flBpp);
1290 psPicParams->sInParams.SeInitQP = (IMG_UINT8)(45 - 66.67 * flBpp);
1293 psPicParams->sInParams.SeInitQP = (IMG_UINT8)(36 - 24.72 * flBpp);
1296 psPicParams->sInParams.SeInitQP = (IMG_UINT8)(34 - 19.78 * flBpp);
1299 psPicParams->sInParams.SeInitQP = (IMG_UINT8)(27 - 9.89 * flBpp);
1302 psPicParams->sInParams.SeInitQP = (IMG_UINT8)(20 - 4.95 * flBpp);
1304 psPicParams->sInParams.SeInitQP = psPicParams->sInParams.MinQPVal;
1306 if (psPicParams->sInParams.SeInitQP < psPicParams->sInParams.MinQPVal)
1307 psPicParams->sInParams.SeInitQP = psPicParams->sInParams.MinQPVal;
1315 psPicParams->sInParams.RCScaleFactor = 16;
1316 psPicParams->sInParams.MaxQPVal = 31;
1343 psPicParams->sInParams.SeInitQP = 31;
1346 psPicParams->sInParams.SeInitQP = 26;
1349 psPicParams->sInParams.SeInitQP = 22;
1352 psPicParams->sInParams.SeInitQP = 18;
1355 psPicParams->sInParams.SeInitQP = 14;
1358 psPicParams->sInParams.SeInitQP = 10;
1360 psPicParams->sInParams.SeInitQP = 8;
1362 psPicParams->sInParams.AvQPVal = psPicParams->sInParams.SeInitQP;
1367 psPicParams->sInParams.MinQPVal = 1;
1369 psPicParams->sInParams.MinQPVal = 4;
1386 psPicParams->Flags |= (ISVCM_FLAGS | ISCBR_FLAGS);
1389 psPicParams->sInParams.VCMBitrateMargin = 122;
1392 psPicParams->sInParams.VCMBitrateMargin = 127;
1397 psPicParams->sInParams.VCMBitrateMargin -= 5;
1399 psPicParams->sInParams.ForeceSkipMargin = 0; /* start skipping MBs when within 500 bits of slice or frame limit */
1401 psPicParams->sInParams.ScaleFactor = 0;
1403 psPicParams->sInParams.ScaleFactor = 1;
1405 psPicParams->sInParams.ScaleFactor = 2;
1407 psPicParams->sInParams.ScaleFactor = 3;
1409 psPicParams->sInParams.ScaleFactor = 4;
1412 psPicParams->sInParams.BufferSize = i32BufferSizeInFrames;
1416 psPicParams->Flags |= ISCBR_FLAGS;
1419 psPicParams->sInParams.BufferSize = psRCParams->BufferSize;
1423 psPicParams->sInParams.ScaleFactor = 0;
1425 psPicParams->sInParams.ScaleFactor = 1;
1427 psPicParams->sInParams.ScaleFactor = 2;
1429 psPicParams->sInParams.ScaleFactor = 3;
1431 psPicParams->sInParams.ScaleFactor = 4;
1437 psPicParams->Flags |= ISCBR_FLAGS;
1442 if ((psPicParams->sInParams.MBPerFrm > 1024 && flBpp < 16) || (psPicParams->sInParams.MBPerFrm <= 1024 && flBpp < 24))
1443 psPicParams->sInParams.HalfFrameRate = 1;
1445 psPicParams->sInParams.HalfFrameRate = 0;
1447 if (psPicParams->sInParams.HalfFrameRate >= 1) {
1448 psPicParams->sInParams.SeInitQP = 31;
1449 psPicParams->sInParams.AvQPVal = 31;
1450 psPicParams->sInParams.MyInitQP = 31;
1453 psPicParams->sInParams.BufferSize = psRCParams->BufferSize;
1454 if (psPicParams->sInParams.BufferSize > 112 * 16384) // Simple Profile L5 Constraints
1455 psPicParams->sInParams.BufferSize = 112 * 16384;
1461 psPicParams->Flags |= ISVBR_FLAGS;
1463 psPicParams->sInParams.MBPerBU = psPicParams->sInParams.MBPerFrm;
1464 psPicParams->sInParams.BUPerFrm = 1;
1467 psPicParams->sInParams.BufferSize = psRCParams->BufferSize;
1470 if (psPicParams->sInParams.BufferSize > 112 * 16384)
1471 psPicParams->sInParams.BufferSize = 112 * 16384; // Simple Profile L5 Constraints
1477 psPicParams->sInParams.ScaleFactor = 2; /* related to complexity */
1479 psPicParams->sInParams.ScaleFactor = 4;
1481 psPicParams->sInParams.ScaleFactor = 6;
1488 psPicParams->sInParams.MyInitQP = psPicParams->sInParams.SeInitQP;
1492 psPicParams->Flags |= SYNC_SEQUENCER;
1495 psPicParams->sInParams.InitialDelay = psRCParams->InitialDelay;
1496 psPicParams->sInParams.InitialLevel = psRCParams->InitialLevel;
1497 psRCParams->InitialQp = psPicParams->sInParams.SeInitQP;
1500 psPicParams->sInParams.SeInitQP,
1501 psPicParams->sInParams.MinQPVal,
1502 psPicParams->sInParams.MaxQPVal);
1520 PIC_PARAMS *psPicParams,
1539 psPicParams->sInParams.SeInitQP = psRCParams->InitialQp;
1541 psPicParams->sInParams.MBPerRow = (psContext->Width >> 4);
1542 psPicParams->sInParams.MBPerBU = psRCParams->BUSize;
1543 psPicParams->sInParams.MBPerFrm = (psContext->Width >> 4) * (psContext->Height >> 4);
1544 psPicParams->sInParams.BUPerFrm = (psPicParams->sInParams.MBPerFrm) / psRCParams->BUSize;
1545 psPicParams->sInParams.AvQPVal = psRCParams->InitialQp;
1546 psPicParams->sInParams.MyInitQP = psRCParams->InitialQp;
1547 psPicParams->sInParams.MaxFrameSize = psRCParams->BitsPerSecond / psRCParams->FrameRate;
1549 ui8InitialSeInitQP = psPicParams->sInParams.SeInitQP;
1551 pnw__update_rcdata(psContext, psPicParams, psRCParams);
1556 psPicParams->sInParams.MinQPVal = (IMG_UINT8)psRCParams->MinQP;
1562 psPicParams->sInParams.SeInitQP = ui8InitialSeInitQP;
1563 psPicParams->sInParams.MyInitQP = ui8InitialSeInitQP;
1573 psPicParams->ClockDivBitrate = (90000 * 0x100000000LL);
1574 psPicParams->ClockDivBitrate /= psRCParams->BitsPerSecond;
1575 psPicParams->MaxBufferMultClockDivBitrate = (IMG_UINT32)