From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: "Wang, Fei W" <fei.w.wang@intel.com>
Subject: Re: [FFmpeg-devel] [PATCH v1 1/2] lavc/qsvdec: Allow decoders to export crop information
Date: Fri, 24 May 2024 02:03:27 +0000
Message-ID: <df72079d963578bcb780ebd76e97a3f37d054bdb.camel@intel.com> (raw)
In-Reply-To: <20240520020553.1155143-1-fei.w.wang@intel.com>
On Ma, 2024-05-20 at 10:05 +0800, fei.w.wang-at-intel.com@ffmpeg.org wrote:
> From: Fei Wang <fei.w.wang@intel.com>
>
> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
> ---
> libavcodec/qsvdec.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
> index a51ddace62..12cf630593 100644
> --- a/libavcodec/qsvdec.c
> +++ b/libavcodec/qsvdec.c
> @@ -859,6 +859,10 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext
> *q,
> else
> frame->flags &= ~AV_FRAME_FLAG_KEY;
> }
> + frame->crop_left = outsurf->Info.CropX;
> + frame->crop_top = outsurf->Info.CropY;
> + frame->crop_right = outsurf->Info.Width - (outsurf->Info.CropX +
> outsurf->Info.CropW);
> + frame->crop_bottom = outsurf->Info.Height - (outsurf->Info.CropY +
> outsurf->Info.CropH);
>
> /* update the surface properties */
> if (avctx->pix_fmt == AV_PIX_FMT_QSV)
> @@ -1148,7 +1152,7 @@ const FFCodec ff_##x##_qsv_decoder = { \
> .p.priv_class = &x##_qsv_class, \
> .hw_configs = qsv_hw_configs, \
> .p.wrapper_name = "qsv", \
> - .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, \
> + .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE |
> FF_CODEC_CAP_EXPORTS_CROPPING, \
> }; \
>
> #define DEFINE_QSV_DECODER(x, X, bsf_name) DEFINE_QSV_DECODER_WITH_OPTION(x,
> X, bsf_name, options)
patchset LGTM, will apply
Thanks
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".
prev parent reply other threads:[~2024-05-24 2:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 2:05 fei.w.wang-at-intel.com
2024-05-20 2:05 ` [FFmpeg-devel] [PATCH v1 2/2] lavc/qsvdec: Use coded_w/h for frame resolution when use system memory fei.w.wang-at-intel.com
2024-05-24 2:03 ` Xiang, Haihao [this message]
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=df72079d963578bcb780ebd76e97a3f37d054bdb.camel@intel.com \
--to=haihao.xiang-at-intel.com@ffmpeg.org \
--cc=fei.w.wang@intel.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