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
Fixes and Enhancements for VAAPI Overlay #42
Conversation
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Currently segfaults in this case. Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
|
/submit |
|
Submitted as pull.42.ffstaging.FFmpeg.1665399281.ffmpegagent@gmail.com To fetch this version into To fetch this version to local tag |
|
User |
|
User |
|
User |
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
675b527
to
b3ea03e
Compare
|
/submit |
|
Submitted as pull.42.v2.ffstaging.FFmpeg.1667197207.ffmpegagent@gmail.com To fetch this version into To fetch this version to local tag |
libavfilter/vf_overlay_vaapi.c
Outdated
| @@ -38,34 +38,6 @@ typedef struct OverlayVAAPIContext { | |||
| float alpha; | |||
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.
On the FFmpeg mailing list, "Xiang, Haihao" wrote (reply to this):
On Mon, 2022-10-31 at 06:19 +0000, softworkz wrote:
> From: softworkz <softworkz@hotmail.com>
>
> Signed-off-by: softworkz <softworkz@hotmail.com>
> ---
> libavfilter/vf_overlay_vaapi.c | 30 +-----------------------------
> 1 file changed, 1 insertion(+), 29 deletions(-)
>
> diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c
> index 3e6a0de13f..218daf571f 100644
> --- a/libavfilter/vf_overlay_vaapi.c
> +++ b/libavfilter/vf_overlay_vaapi.c
> @@ -38,34 +38,6 @@ typedef struct OverlayVAAPIContext {
> float alpha;
> } OverlayVAAPIContext;
>
> -static int overlay_vaapi_query_formats(AVFilterContext *ctx)
> -{
> - int ret;
> - enum {
> - MAIN = 0,
> - OVERLAY = 1,
> - };
> -
> - static const enum AVPixelFormat pix_fmts[] = {
> - AV_PIX_FMT_VAAPI,
> - AV_PIX_FMT_NONE
> - };
> -
> - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->inputs[MAIN]-
> >outcfg.formats);
> - if (ret < 0)
> - return ret;
> -
> - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx-
> >inputs[OVERLAY]->outcfg.formats);
> - if (ret < 0)
> - return ret;
> -
> - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->outputs[0]-
> >incfg.formats);
> - if (ret < 0)
> - return ret;
> -
> - return 0;
> -}
> -
> static int overlay_vaapi_build_filter_params(AVFilterContext *avctx)
> {
> VAAPIVPPContext *vpp_ctx = avctx->priv;
> @@ -418,6 +390,6 @@ const AVFilter ff_vf_overlay_vaapi = {
> .activate = &overlay_vaapi_activate,
> FILTER_INPUTS(overlay_vaapi_inputs),
> FILTER_OUTPUTS(overlay_vaapi_outputs),
> - FILTER_QUERY_FUNC(overlay_vaapi_query_formats),
> + FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VAAPI),
> .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
> };
Patchset LGTM, will apply
-Haihao
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
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.
On the FFmpeg mailing list, "Xiang, Haihao" wrote (reply to this):
On Fri, 2022-11-04 at 02:07 +0000, Xiang, Haihao wrote:
> On Mon, 2022-10-31 at 06:19 +0000, softworkz wrote:
> > From: softworkz <softworkz@hotmail.com>
> >
> > Signed-off-by: softworkz <softworkz@hotmail.com>
> > ---
> > libavfilter/vf_overlay_vaapi.c | 30 +-----------------------------
> > 1 file changed, 1 insertion(+), 29 deletions(-)
> >
> > diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c
> > index 3e6a0de13f..218daf571f 100644
> > --- a/libavfilter/vf_overlay_vaapi.c
> > +++ b/libavfilter/vf_overlay_vaapi.c
> > @@ -38,34 +38,6 @@ typedef struct OverlayVAAPIContext {
> > float alpha;
> > } OverlayVAAPIContext;
> >
> > -static int overlay_vaapi_query_formats(AVFilterContext *ctx)
> > -{
> > - int ret;
> > - enum {
> > - MAIN = 0,
> > - OVERLAY = 1,
> > - };
> > -
> > - static const enum AVPixelFormat pix_fmts[] = {
> > - AV_PIX_FMT_VAAPI,
> > - AV_PIX_FMT_NONE
> > - };
> > -
> > - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->inputs[MAIN]-
> > > outcfg.formats);
> > - if (ret < 0)
> > - return ret;
> > -
> > - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx-
> > > inputs[OVERLAY]->outcfg.formats);
> > - if (ret < 0)
> > - return ret;
> > -
> > - ret = ff_formats_ref(ff_make_format_list(pix_fmts), &ctx->outputs[0]-
> > > incfg.formats);
> > - if (ret < 0)
> > - return ret;
> > -
> > - return 0;
> > -}
> > -
> > static int overlay_vaapi_build_filter_params(AVFilterContext *avctx)
> > {
> > VAAPIVPPContext *vpp_ctx = avctx->priv;
> > @@ -418,6 +390,6 @@ const AVFilter ff_vf_overlay_vaapi = {
> > .activate = &overlay_vaapi_activate,
> > FILTER_INPUTS(overlay_vaapi_inputs),
> > FILTER_OUTPUTS(overlay_vaapi_outputs),
> > - FILTER_QUERY_FUNC(overlay_vaapi_query_formats),
> > + FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VAAPI),
> > .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
> > };
>
> Patchset LGTM, will apply
>
Pushed,
-Haihao
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
|
This has been merged already. |
|
Invalid author email in a064193: "4985349+softworkz@users.noreply.github.com" |
|
There is a merge commit in this Pull Request: Please rebase the branch and force-push. |
This patchset resolves a number of issues in the current code:
and adds a number of enhancements to bring this on-par with the other overlay filters:
v2 Changes:
cc: Gyan Doshi ffmpeg@gyani.pro
cc: Soft Works softworkz@hotmail.com
cc: "Xiang, Haihao" haihao.xiang-at-intel.com@ffmpeg.org