-
Notifications
You must be signed in to change notification settings - Fork 346
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
replace the reconstruct surface to be variant #915
base: master
Are you sure you want to change the base?
Conversation
5169e35
to
fbfb950
Compare
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.
Hi @XinfengZhang, thanks for working this out.
Verified with AYUV and Y410 encoding, this recon methods for me without resize on application level.
However, previous concern about Y210 still existed, and we'd better handle Y210 as well.
(Verified, garbage still existed.)
859cddf
to
c3dafe7
Compare
updated for Y210 |
DdiMediaUtil_LockMutex(&mediaCtx->SurfaceMutex); | ||
uint32_t i; | ||
//get current element heap and index | ||
for(i = 0; i < mediaCtx->pSurfaceHeap->uiAllocatedHeapElements; i ++) |
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.
Maybe we can replace this segment with DdiMedia_GetVASurfaceIDFromSurface.
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.
yes
surfaceElement ++; | ||
} | ||
//if cant find | ||
if(i == surface->pMediaCtx->pSurfaceHeap->uiAllocatedHeapElements) |
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.
I think it will be great if we move this condition checking to the beginning of the function, then we will no need to allocate the dstSurface.
@@ -298,6 +298,8 @@ typedef struct _DDI_MEDIA_SURFACE | |||
uint8_t *pSystemShadow; // Shadow surface in system memory | |||
|
|||
uint32_t uiMapFlag; | |||
|
|||
uint32_t uiVariantFlag; |
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.
Are there any reserved purposes for this flag? If no, maybe bool is enough for it.
@XinfengZhang Note that MSDK needs some related change for this, otherwise it'll break the current encoding path since the surface reallocation is handled inside driver now. |
c3dafe7
to
1df8427
Compare
Verified with this patch applied on 7620ba2, works for me for both Y210 and AYUV/Y410. |
DDI_CHK_RET(RegisterRTSurfaces(&(m_encodeCtx->RTtbl), DdiMedia_GetSurfaceFromVASurfaceID(mediaCtx, picParams->decoded_curr_pic.picture_id)), "RegisterRTSurfaces failed!"); | ||
surface = DdiMedia_GetSurfaceFromVASurfaceID(mediaCtx, picParams->decoded_curr_pic.picture_id); | ||
|
||
if(m_encodeCtx->vaProfile == VAProfileHEVCMain444 |
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.
Why no 420 10 bit here?
44a9782
to
2608509
Compare
replace the reconstruct surface to be variant surface for HEVC REXT encoding it could make the difference between recon/raw to be transparent to application pay attention , the surface should be not read or write. Signed-off-by: XinfengZhang <[email protected]>
Signed-off-by: XinfengZhang <[email protected]>
corresponding msdk change Intel-Media-SDK/MediaSDK#2151 |
replace the reconstruct surface to be variant surface for HEVC REXT encoding
it could make the difference between recon/raw to be transparent to application
pay attention , the surface should be not read or write.
Signed-off-by: XinfengZhang [email protected]