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

core/libraries: WIP Videodec2 implementation #1241

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

polybiusproxy
Copy link
Collaborator

@polybiusproxy polybiusproxy commented Oct 4, 2024

Work-in-progress and very basic implementation of the Videodec2 library.
imagen

@polybiusproxy
Copy link
Collaborator Author

polybiusproxy commented Oct 5, 2024

Latest commit fixes crashes on Persona 5 Royal.
imagen

@georgemoralis
Copy link
Collaborator

@vladmikhalin can you review this?

@vladmikhalin
Copy link
Collaborator

@vladmikhalin can you review this?

It's still a draft, is it ready for review?

@georgemoralis
Copy link
Collaborator

it is ready

@polybiusproxy
Copy link
Collaborator Author

@vladmikhalin can you review this?

It's still a draft, is it ready for review?

It's still marked as a draft but I'd still want you to review it

Copy link
Collaborator

@vladmikhalin vladmikhalin left a comment

Choose a reason for hiding this comment

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

Apart from the obvious magic numbers and bogus values that I can attribute to this PR being a draft I only have these 2 comments.

}

AVFrame* frame = av_frame_alloc();
ret = avcodec_receive_frame(mCodecContext, frame);
Copy link
Collaborator

Choose a reason for hiding this comment

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

One packet can contain several frames. You should drain them all until AVERROR(EAGAIN) or AVERROR_EOF is returned. What you can do here is call avcodec_receive_frame before avcodec_send_packet to query the decoder on available frames. Only if it returns AVERROR(EAGAIN) you should call avcodec_send_packet again.

outputInfo.pictureCount = 0;

packet->data = (u8*)inputData.pAuData;
packet->size = inputData.auSize;
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can set packet->pts to inputData.ptsData and packet->dts to inputData.dtsData

@georgemoralis
Copy link
Collaborator

what other games uses videcodec2 expect persona????

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.

3 participants