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

[Question]: How to get calculated QP in a picture? #496

Closed
MemeTao opened this issue Aug 26, 2024 · 4 comments
Closed

[Question]: How to get calculated QP in a picture? #496

MemeTao opened this issue Aug 26, 2024 · 4 comments
Labels

Comments

@MemeTao
Copy link

MemeTao commented Aug 26, 2024

Can i get QP directly from amf api ?

Currently i used following code but not works:

// before encode
setProperty(encoder, AMF_VIDEO_ENCODER_STATISTICS_FEEDBACK, true);
...
uint64_t average_qp = 0;
pkt->GetProperty(AMF_VIDEO_ENCODER_STATISTIC_AVERAGE_QP, &average_qp); // not works
@DimkaTsv
Copy link

DimkaTsv commented Aug 26, 2024

So... Infostealer is being spread via GitHub?
DO NOT DOWNLOAD THIS "fix.zip"! (Or at least do not run executable inside archive)

UPD: GitHub acted and deleted these messages

@DimkaTsv
Copy link

DimkaTsv commented Aug 26, 2024

yes I was tricked by this too

Well, sorry, but before you sent answer i already reported you as hacked account spreading malware.


Anyways, back to topic. It seems like VCEEnc developer rigaya does it this way, but similar fragments with slightly different last line encounters several times, so idk which one is one that is closest to your case.

uint32_t value32 = 0;
if (buffer->GetProperty(AMF_PARAM_STATISTIC_AVERAGE_QP(m_encCodec), &value32) == AMF_OK) {
    output->setAvgQP(value32);

But i am not coder, so i just found snippet that seems to be helpful to your question.

@MikhailAMD
Copy link
Collaborator

AMF_VIDEO_ENCODER_STATISTICS_FEEDBACK needs to be set on input surface every time, not on encoder.

@MemeTao
Copy link
Author

MemeTao commented Aug 27, 2024

AMF_VIDEO_ENCODER_STATISTICS_FEEDBACK needs to be set on input surface every time, not on encoder.

thanks!

@MemeTao MemeTao closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants
@DimkaTsv @MikhailAMD @MemeTao and others