Skip to content

PSNR computation from reconstructed frame. CRC calculation and various build fixes.#204

Merged
zlatinski merged 2 commits intonvpro-samples:mainfrom
vasn1k:psnr_recon_frame
Mar 30, 2026
Merged

PSNR computation from reconstructed frame. CRC calculation and various build fixes.#204
zlatinski merged 2 commits intonvpro-samples:mainfrom
vasn1k:psnr_recon_frame

Conversation

@vasn1k
Copy link
Copy Markdown
Contributor

@vasn1k vasn1k commented Feb 26, 2026

This change implements:

  • PSNR computation from reconstructed frame.
  • CRC calculation support for encoder.
  • Removal of shaderc debug spew.
  • Fix AV1 encoder where InvalidateStaleReferenceFrames gets called with an invalid pictureIdx

Copy link
Copy Markdown
Contributor

@zlatinski zlatinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Vassili, for the change.
Please encapsulate your CRC and PSNR code and clean it up.
Please also rebase your change to the ToT.

@vasn1k vasn1k force-pushed the psnr_recon_frame branch 6 times, most recently from 95e51a8 to c76297d Compare March 17, 2026 21:28
@vasn1k vasn1k requested a review from zlatinski March 17, 2026 21:41
Copy link
Copy Markdown
Contributor

@zlatinski zlatinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these need a bit more work. Please see below.

VkVideoEndCodingInfoKHR encodeEndInfo { VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR };
vkDevCtx->CmdEndVideoCodingKHR(cmdBuf, &encodeEndInfo);

if (m_psnr && m_psnr->Enabled() && (encodeFrameInfo->setupImageResource != nullptr)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run the validation layer against those.

Signed-off-by: Vassili Nikolaev (NVIDIA) <vnikolaev@nvidia.com>
@vasn1k vasn1k force-pushed the psnr_recon_frame branch 2 times, most recently from 2c7e86d to 449630b Compare March 21, 2026 04:42
Copy link
Copy Markdown
Contributor

@zlatinski zlatinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes! I'm still looking at the rest of the changes. One question:
Only the libs and the demo binaries supposed to have your code, right? Why does the test app need it? Because of the file provider containing the CRC?

@vasn1k vasn1k force-pushed the psnr_recon_frame branch from 449630b to a53e4a0 Compare March 23, 2026 18:30
Copy link
Copy Markdown
Contributor

@zlatinski zlatinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes, Vassili! A few minor issues left to address.

Signed-off-by: Vassili Nikolaev (NVIDIA) <vnikolaev@nvidia.com>

Add support for Encoder CRC calculation

Signed-off-by: Vassili Nikolaev (NVIDIA) <vnikolaev@nvidia.com>

Refactor PSNR/CRC

Signed-off-by: Vassili Nikolaev (NVIDIA) <vnikolaev@nvidia.com>
@vasn1k vasn1k force-pushed the psnr_recon_frame branch from a53e4a0 to 2d6134b Compare March 23, 2026 23:48
Copy link
Copy Markdown
Contributor

@zlatinski zlatinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for the changes!

@zlatinski zlatinski merged commit a32ba59 into nvpro-samples:main Mar 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants