-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Videocodec implementation #1484
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
Conversation
think this could be rebased so I can test with ajm? |
bd8adb8
to
daaf6b0
Compare
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good at first glance, I do have a few nits though.
To start, this one is quite personal, I quite dislike the lack of empty newlines on some functions--to take one example:
int PS4_SYSV_ABI sceVideodecFlush(OrbisVideodecCtrl* pCtrlIn,
OrbisVideodecFrameBuffer* pFrameBufferInOut,
OrbisVideodecPictureInfo* pPictureInfoOut) {
LOG_INFO(Lib_Videodec, "called");
if (!pFrameBufferInOut || !pPictureInfoOut) {
return ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER;
}
if (pFrameBufferInOut->thisSize != sizeof(OrbisVideodecFrameBuffer) ||
pPictureInfoOut->thisSize != sizeof(OrbisVideodecPictureInfo)) {
return ORBIS_VIDEODEC_ERROR_STRUCT_SIZE;
}
VdecDecoder* decoder = (VdecDecoder*)pCtrlIn->handle;
if (!decoder) {
return ORBIS_VIDEODEC_ERROR_HANDLE;
}
return decoder->Flush(*pFrameBufferInOut, *pPictureInfoOut);
}
I believe it would look better this way:
int PS4_SYSV_ABI sceVideodecFlush(OrbisVideodecCtrl* pCtrlIn,
OrbisVideodecFrameBuffer* pFrameBufferInOut,
OrbisVideodecPictureInfo* pPictureInfoOut) {
LOG_INFO(Lib_Videodec, "called");
if (!pFrameBufferInOut || !pPictureInfoOut) {
return ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER;
}
if (pFrameBufferInOut->thisSize != sizeof(OrbisVideodecFrameBuffer) ||
pPictureInfoOut->thisSize != sizeof(OrbisVideodecPictureInfo)) {
return ORBIS_VIDEODEC_ERROR_STRUCT_SIZE;
}
VdecDecoder* decoder = (VdecDecoder*)pCtrlIn->handle;
if (!decoder) {
return ORBIS_VIDEODEC_ERROR_HANDLE;
}
return decoder->Flush(*pFrameBufferInOut, *pPictureInfoOut);
}
clang-format doesn't mind it, but I do.
Secondly, I ask you to change the names of function arguments and struct members to avoid using Hungarian notation which would go against the whole code style from the emulator, so rename things like pPictureInfoOut
to pictureInfo
. It wouldn't make sense either way since you're also using it on references.
Finally, since this class is named VdecDecoder
, to avoid confusion I believe we should either change the Vdec2 implementation class's name to Vdec2Decoder
or make a common class for both classes to inherit from.
daaf6b0
to
e4bc44c
Compare
a2cf794
to
5739e12
Compare
* dummy videocodec * filled videodec parameters * vdec1 implementation * clang format fix * fixed codecType * added crop offset info * align output * align all h/w * some touchups * small touch (last one)
* dummy videocodec * filled videodec parameters * vdec1 implementation * clang format fix * fixed codecType * added crop offset info * align output * align all h/w * some touchups * small touch (last one)
* dummy videocodec * filled videodec parameters * vdec1 implementation * clang format fix * fixed codecType * added crop offset info * align output * align all h/w * some touchups * small touch (last one)
Based on @polybiusproxy videodec2 implementation . Seems to work , reply with tests thanks :D