-
Notifications
You must be signed in to change notification settings - Fork 47
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
VAAPI VVC decoder #714
VAAPI VVC decoder #714
Conversation
f71956d
to
f235f81
Compare
pic->param_allocated, | ||
sizeof(*pic->param_buffers)); | ||
if (!pic->param_buffers) | ||
return AVERROR(ENOMEM); |
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.
two issues if av_realloc_array failed
- pic->param_buffers is not released.
- you have updated pic->param_allocated, next "if (pic->nb_param_buffers == pic->param_allocated)" check is wrong
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.
- If realloc fail, ff_vaapi_decode_cancel() will be called to destory all va buffer and release param_buffers handle.
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.
Resolved 2.
@@ -138,6 +140,10 @@ static VVCFrame *alloc_frame(VVCContext *s, VVCFrameContext *fc) | |||
if (!frame->progress) | |||
goto fail; | |||
|
|||
ret = ff_hwaccel_frame_priv_alloc(s->avctx, &frame->hwaccel_picture_private); |
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.
all software buffer allocation can be skipped, like rpl to progress
also all software delay frames can be removed. we do not need a delay for hw. we can output it immediately after vaEndPicture.
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 better to keep software buffers there which can help check illegal syntax. And RPL may insert new ref frame to DPB in some special case, if skipped it, maybe cause unexpected error to HW. I will check how to remove defay frames.
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.
Delay logic in vvc native decoder may provide sync_depth function to HW like VAAPI encoder/vpp. And there is option that can turn OFF the delay. So I think it will be better to keep delay for HW too.
typedef struct VAAPIDecodePicture { | ||
VASurfaceID output_surface; | ||
|
||
int nb_param_buffers; | ||
VABufferID param_buffers[MAX_PARAM_BUFFERS]; | ||
VABufferID *param_buffers; | ||
int param_allocated; |
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.
s/param_allocated/nb_allocated_buffers ?
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'd prefer param_allocated which is samilar with slices_allocated.
Signed-off-by: Fei Wang <[email protected]>
So that hardware decoder can use the flags too. Signed-off-by: Fei Wang <[email protected]>
Signed-off-by: Fei Wang <[email protected]>
Signed-off-by: Fei Wang <[email protected]>
Signed-off-by: Fei Wang <[email protected]>
Signed-off-by: Fei Wang <[email protected]>
Signed-off-by: Fei Wang <[email protected]>
No description provided.