From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: "philipl@overt.org" <philipl@overt.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/4] swscale/input: add support for XV36LE
Date: Mon, 5 Sep 2022 08:40:28 +0000
Message-ID: <45c92b368551776c752db244e6cfcbef34a8b262.camel@intel.com> (raw)
In-Reply-To: <20220905051430.218289-2-philipl@overt.org>
On Sun, 2022-09-04 at 22:14 -0700, Philip Langdale wrote:
> Signed-off-by: Philip Langdale <philipl@overt.org>
> ---
> libswscale/input.c | 25 +++++++++++++++++++++++++
> libswscale/utils.c | 1 +
> 2 files changed, 26 insertions(+)
>
> diff --git a/libswscale/input.c b/libswscale/input.c
> index 92681c9c53..8032360907 100644
> --- a/libswscale/input.c
> +++ b/libswscale/input.c
> @@ -685,6 +685,25 @@ static void read_vuya_A_c(uint8_t *dst, const uint8_t
> *src, const uint8_t *unuse
> dst[i] = src[i * 4 + 3];
> }
>
> +static void read_xv36le_Y_c(uint8_t *dst, const uint8_t *src, const uint8_t
> *unused0, const uint8_t *unused1, int width,
> + uint32_t *unused2, void *opq)
> +{
> + int i;
> + for (i = 0; i < width; i++)
> + AV_WN16(dst + i * 2, AV_RL16(src + i * 8 + 2) >> 4);
> +}
> +
> +
> +static void read_xv36le_UV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t
> *unused0, const uint8_t *src,
> + const uint8_t *unused1, int width, uint32_t
> *unused2, void *opq)
> +{
> + int i;
> + for (i = 0; i < width; i++) {
> + AV_WN16(dstU + i * 2, AV_RL16(src + i * 8 + 0) >> 4);
> + AV_WN16(dstV + i * 2, AV_RL16(src + i * 8 + 4) >> 4);
> + }
> +}
> +
> /* This is almost identical to the previous, end exists only because
> * yuy2ToY/UV)(dst, src + 1, ...) would have 100% unaligned accesses. */
> static void uyvyToY_c(uint8_t *dst, const uint8_t *src, const uint8_t
> *unused1, const uint8_t *unused2, int width,
> @@ -1381,6 +1400,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
> case AV_PIX_FMT_AYUV64LE:
> c->chrToYV12 = read_ayuv64le_UV_c;
> break;
> + case AV_PIX_FMT_XV36LE:
> + c->chrToYV12 = read_xv36le_UV_c;
> + break;
> case AV_PIX_FMT_P010LE:
> case AV_PIX_FMT_P210LE:
> case AV_PIX_FMT_P410LE:
> @@ -1759,6 +1781,9 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
> case AV_PIX_FMT_AYUV64LE:
> c->lumToYV12 = read_ayuv64le_Y_c;
> break;
> + case AV_PIX_FMT_XV36LE:
> + c->lumToYV12 = read_xv36le_Y_c;
> + break;
> case AV_PIX_FMT_YUYV422:
> case AV_PIX_FMT_YVYU422:
> case AV_PIX_FMT_YA8:
> diff --git a/libswscale/utils.c b/libswscale/utils.c
> index a621a35862..a67e07b612 100644
> --- a/libswscale/utils.c
> +++ b/libswscale/utils.c
> @@ -262,6 +262,7 @@ static const FormatEntry format_entries[] = {
> [AV_PIX_FMT_VUYX] = { 1, 1 },
> [AV_PIX_FMT_RGBAF16BE] = { 1, 0 },
> [AV_PIX_FMT_RGBAF16LE] = { 1, 0 },
> + [AV_PIX_FMT_XV36LE] = { 1, 0 },
> };
>
> int ff_shuffle_filter_coefficients(SwsContext *c, int *filterPos,
Patchset LGTM. You have another patchset for output, right?
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".
next prev parent reply other threads:[~2022-09-05 8:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 5:14 [FFmpeg-devel] [PATCH 0/4] swscale/input: Add support for new VAAPI formats Philip Langdale
2022-09-05 5:14 ` [FFmpeg-devel] [PATCH 1/4] swscale/input: add support for XV36LE Philip Langdale
2022-09-05 8:40 ` Xiang, Haihao [this message]
2022-09-05 18:07 ` Philip Langdale
2022-09-05 5:14 ` [FFmpeg-devel] [PATCH 2/4] swscale/input: add support for P012 Philip Langdale
2022-09-05 5:14 ` [FFmpeg-devel] [PATCH 3/4] swscale/input: add support for XV30LE Philip Langdale
2022-09-05 5:14 ` [FFmpeg-devel] [PATCH 4/4] swscale/input: add support for Y212LE Philip Langdale
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=45c92b368551776c752db244e6cfcbef34a8b262.camel@intel.com \
--to=haihao.xiang-at-intel.com@ffmpeg.org \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=philipl@overt.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