Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reset_gop_hash and update_gop_hash APIs #265

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

mithydolphin
Copy link
Contributor

These APIs are no longer needed as recursive hash is not used.

Describe your changes

Please include a summary of the change, a relevant motivation and context.

Issue ticket number and link

  • Fixes #(issue)

Checklist before requesting a review

  • I have performed a self-review of my own code
  • I have verified that the code builds perfectly fine on my local system
  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have verified that my code follows the style already available in the repository
  • I have made corresponding changes to the documentation

These APIs are no longer needed as recursive hash is not used.
@@ -29,9 +29,9 @@
#include "legacy_validation.h"
#include "signed_video_authenticity.h" // create_local_authenticity_report_if_needed()
#include "signed_video_defines.h" // svrc_t
#include "signed_video_h26x_internal.h" // gop_state_*(), update_gop_hash(), update_validation_flags()
#include "signed_video_h26x_internal.h" // gop_state_*() , update_validation_flags()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove space.

// Reset the gop_hash since we start a new GOP.
SV_THROW(reset_gop_hash(self));
// Reset the |num_nalus_in_gop_hash| since we start a new GOP.
self->gop_info->num_nalus_in_gop_hash = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

You already got "gop_info" from row 350.

Copy link
Contributor

@lusikamalo lusikamalo left a comment

Choose a reason for hiding this comment

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

Just some minor stuff.

assert(gop_info);

gop_info->num_nalus_in_gop_hash = 0;
return openssl_hash_data(self->crypto_handle, &gop_info->gop_hash_init, 1, gop_info->gop_hash);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should write a ticket to init the new gop hash computation with gop_hash_init.

Copy link
Contributor

@lusikamalo lusikamalo left a comment

Choose a reason for hiding this comment

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

OK.

@mithydolphin mithydolphin merged commit 38ce246 into master Dec 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants