MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXNTC / PickLatentShape

Function PickLatentShape

tools/cli/NtcCommandLine.cpp:629–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629bool PickLatentShape(ntc::LatentShape& outShape)
630{
631 if (!std::isnan(g_options.targetPsnr) || g_options.matchBcPsnr)
632 {
633 // When doing adaptive compression, start with an empty latent space because the first configuration
634 // will be given by the adaptive compression session.
635 outShape = ntc::LatentShape::Empty();
636 }
637 else if (!std::isnan(g_options.bitsPerPixel))
638 {
639 float selectedBpp = 0.f;
640 if (ntc::PickLatentShape(g_options.bitsPerPixel, selectedBpp, outShape) != ntc::Status::Ok)
641 {
642 fprintf(stderr, "Cannot select a latent shape for %.3f bpp.\n", g_options.bitsPerPixel);
643 return false;
644 }
645
646 printf("Selected latent shape for %.3f bpp: --gridSizeScale %d --numFeatures %d\n",
647 selectedBpp, outShape.gridSizeScale, outShape.numFeatures);
648 }
649 else
650 {
651 outShape.gridSizeScale = g_options.gridSizeScale;
652 outShape.numFeatures = g_options.numFeatures;
653 }
654 return true;
655}
656
657void OverrideTextureBcFormat(ntc::ITextureMetadata* texture, ManifestEntry* manifestEntry)
658{

Callers 2

BuildSettingsDialogMethod · 0.85
LoadImagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected