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

Support dump input frames for encoder #186

Closed

Conversation

lsun30
Copy link
Contributor

@lsun30 lsun30 commented Sep 14, 2024

[c2][encoder] Support dump input frames for encoder

Tracked-On: OAM-124731
Signed-off-by: Lina Sun [email protected]

@sysopenci
Copy link

Improper Commit Message
Jira issue not in ['bug','improvement'],
make sure jira issue is of type bug or improvement.

@sysopenci sysopenci added Pending Developer Approval Pending Developer Approval Pending PR Review Pending PR Review Engineering Build Not Started Engineering Build Not Started labels Sep 14, 2024
Tracked-On: OAM-124732
Signed-off-by: Lina Sun <[email protected]>
if (m_count) {
const uint8_t* srcY = c_graph_view->data()[C2PlanarLayout::PLANE_Y];
const uint8_t* srcU = c_graph_view->data()[C2PlanarLayout::PLANE_U];
const uint8_t* srcV = c_graph_view->data()[C2PlanarLayout::PLANE_V];
Copy link

@feijiang1 feijiang1 Sep 14, 2024

Choose a reason for hiding this comment

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

srcV seems useless. Due to NV12 format only has two planes, the srcU can be changed to srcUV.

@@ -1363,6 +1400,46 @@ void MfxC2EncoderComponent::DoWork(std::unique_ptr<C2Work>&& work)
}
}

#if MFX_DEBUG_DUMP_FRAME_ENC == MFX_DEBUG_YES

Choose a reason for hiding this comment

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

it is better implemented as separate function

std::mutex m_count_lock;
FILE* m_file = 0;
bool NeedDumpBuffer();
#endif

Choose a reason for hiding this comment

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

they are only used for dump function, then it is not needed placed under class MfxC2EncoderComponent, we can keep member of class minimal

Copy link

@feijiang1 feijiang1 left a comment

Choose a reason for hiding this comment

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

please add more description how to enable this dump feature

@lsun30 lsun30 closed this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Build Not Started Engineering Build Not Started Pending Developer Approval Pending Developer Approval Pending PR Review Pending PR Review Valid commit message