From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/2] avcodec/vpp_qsv: Copy side data from input to output frame
Date: Wed, 2 Nov 2022 05:23:46 +0100
Message-ID: <GV1P250MB07378467BD08EB6B4B698AA08F399@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <baee95c67b308fc74fbea559a4c668de4478ce71.camel@intel.com>
Xiang, Haihao:
> On Mon, 2022-10-24 at 23:04 +0000, softworkz wrote:
>> From: softworkz <softworkz@hotmail.com>
>>
>> Signed-off-by: softworkz <softworkz@hotmail.com>
>> ---
>> libavfilter/qsvvpp.c | 6 ++++++
>> libavfilter/vf_overlay_qsv.c | 19 +++++++++++++++----
>> 2 files changed, 21 insertions(+), 4 deletions(-)
>>
>> diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
>> index 8428ee89ab..ae9766d12f 100644
>> --- a/libavfilter/qsvvpp.c
>> +++ b/libavfilter/qsvvpp.c
>> @@ -880,6 +880,12 @@ int ff_qsvvpp_filter_frame(QSVVPPContext *s, AVFilterLink
>> *inlink, AVFrame *picr
>> return AVERROR(EAGAIN);
>> break;
>> }
>> +
>> + av_frame_remove_all_side_data(out_frame->frame);
>> + ret = av_frame_copy_side_data(out_frame->frame, in_frame->frame, 0);
>> + if (ret < 0)
>> + return ret;
>> +
>> out_frame->frame->pts = av_rescale_q(out_frame-
>>> surface.Data.TimeStamp,
>> default_tb, outlink->time_base);
>>
>> diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c
>> index d947a1faa1..04fd284b92 100644
>> --- a/libavfilter/vf_overlay_qsv.c
>> +++ b/libavfilter/vf_overlay_qsv.c
>> @@ -231,13 +231,24 @@ static int process_frame(FFFrameSync *fs)
>> {
>> AVFilterContext *ctx = fs->parent;
>> QSVOverlayContext *s = fs->opaque;
>> + AVFrame *frame0 = NULL;
>> AVFrame *frame = NULL;
>> - int ret = 0, i;
>> + int ret = 0;
>>
>> - for (i = 0; i < ctx->nb_inputs; i++) {
>> + for (unsigned i = 0; i < ctx->nb_inputs; i++) {
>> ret = ff_framesync_get_frame(fs, i, &frame, 0);
>> - if (ret == 0)
>> - ret = ff_qsvvpp_filter_frame(s->qsv, ctx->inputs[i], frame);
>> +
>> + if (ret == 0) {
>> + if (i == 0)
>> + frame0 = frame;
>> + else {
>> + av_frame_remove_all_side_data(frame);
>> + ret = av_frame_copy_side_data(frame, frame0, 0);
>> + }
>> +
>> + ret = ret < 0 ? ret : ff_qsvvpp_filter_frame(s->qsv, ctx-
>>> inputs[i], frame);
>> + }
>> +
>> if (ret < 0 && ret != AVERROR(EAGAIN))
>> break;
>> }
>
> Patchset LGTM, I'll push this patchset if no more comment or objection.
>
Can you wait a few days on this? I'd like to take a look at #1.
- Andreas
_______________________________________________
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".
next prev parent reply other threads:[~2022-11-02 4:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 23:04 [FFmpeg-devel] [PATCH 0/2] QSV Overlay Filter: " ffmpegagent
2022-10-24 23:04 ` [FFmpeg-devel] [PATCH 1/2] avutil/frame: Add av_frame_copy_side_data() and av_frame_remove_all_side_data() softworkz
2022-10-24 23:04 ` [FFmpeg-devel] [PATCH 2/2] avcodec/vpp_qsv: Copy side data from input to output frame softworkz
2022-11-01 4:58 ` Xiang, Haihao
2022-11-01 9:17 ` "zhilizhao(赵志立)"
2022-11-02 22:44 ` Soft Works
2022-11-02 4:23 ` Andreas Rheinhardt [this message]
2022-11-02 6:05 ` Xiang, Haihao
2022-11-03 11:41 ` [FFmpeg-devel] [PATCH v2 0/2] QSV Overlay Filter: " ffmpegagent
2022-11-03 11:41 ` [FFmpeg-devel] [PATCH v2 1/2] avutil/frame: Add av_frame_copy_side_data() and av_frame_remove_all_side_data() softworkz
2022-11-28 5:04 ` Xiang, Haihao
2022-11-03 11:41 ` [FFmpeg-devel] [PATCH v2 2/2] avfilter/vpp_qsv: Copy side-data from input to output frame softworkz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=GV1P250MB07378467BD08EB6B4B698AA08F399@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git