From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] GBRAP14 support for MagicYUV Date: Thu, 28 Sep 2023 12:07:44 +0200 Message-ID: <20230928100744.GW3543730@pb2> (raw) In-Reply-To: <CAPYw7P7Qc-ib6CczELCmEDkXoSh65F7VViJn3aYBnztB-epN0g@mail.gmail.com> [-- Attachment #1.1: Type: text/plain, Size: 5180 bytes --] On Wed, Sep 27, 2023 at 07:24:50PM +0200, Paul B Mahol wrote: > Attached. > pixdesc.c | 28 ++++++++++++++++++++++++++++ > pixfmt.h | 4 ++++ > 2 files changed, 32 insertions(+) > dc323faf13db2ffbefdd8ce2c25ba3a97633e0eb 0001-avutil-add-GBRAP14-format-support.patch > From 3e58da932f88e6781eb772d883efa6f0997de936 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol <onemda@gmail.com> > Date: Wed, 27 Sep 2023 16:06:02 +0200 > Subject: [PATCH 1/4] avutil: add GBRAP14 format support > > Signed-off-by: Paul B Mahol <onemda@gmail.com> > --- > libavutil/pixdesc.c | 28 ++++++++++++++++++++++++++++ > libavutil/pixfmt.h | 4 ++++ > 2 files changed, 32 insertions(+) > > diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c > index e1e0dd2a9e..6ded9467b0 100644 > --- a/libavutil/pixdesc.c > +++ b/libavutil/pixdesc.c > @@ -2223,6 +2223,34 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { > }, > .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_BE, > }, > + [AV_PIX_FMT_GBRAP14LE] = { > + .name = "gbrap14le", > + .nb_components = 4, > + .log2_chroma_w = 0, > + .log2_chroma_h = 0, > + .comp = { > + { 2, 2, 0, 0, 14 }, /* R */ > + { 0, 2, 0, 0, 14 }, /* G */ > + { 1, 2, 0, 0, 14 }, /* B */ > + { 3, 2, 0, 0, 14 }, /* A */ > + }, > + .flags = AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | > + AV_PIX_FMT_FLAG_ALPHA, > + }, > + [AV_PIX_FMT_GBRAP14BE] = { > + .name = "gbrap14be", > + .nb_components = 4, > + .log2_chroma_w = 0, > + .log2_chroma_h = 0, > + .comp = { > + { 2, 2, 0, 0, 14 }, /* R */ > + { 0, 2, 0, 0, 14 }, /* G */ > + { 1, 2, 0, 0, 14 }, /* B */ > + { 3, 2, 0, 0, 14 }, /* A */ > + }, > + .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | > + AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA, > + }, > [AV_PIX_FMT_GBRAP12LE] = { > .name = "gbrap12le", > .nb_components = 4, > diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h > index 63e07ba64f..a26c72d56b 100644 > --- a/libavutil/pixfmt.h > +++ b/libavutil/pixfmt.h > @@ -426,6 +426,9 @@ enum AVPixelFormat { > AV_PIX_FMT_P412BE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian > AV_PIX_FMT_P412LE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, little-endian > > + AV_PIX_FMT_GBRAP14BE, ///< planar GBR 4:4:4:4 56bpp, big-endian > + AV_PIX_FMT_GBRAP14LE, ///< planar GBR 4:4:4:4 56bpp, little-endian > + > AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions > }; > > @@ -484,6 +487,7 @@ enum AVPixelFormat { > #define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE) > #define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE) > #define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE) > +#define AV_PIX_FMT_GBRAP14 AV_PIX_FMT_NE(GBRAP14BE, GBRAP14LE) > #define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE) > > #define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE) > -- > 2.42.0 > > libavformat/nut.c | 2 ++ > libswscale/input.c | 7 +++++++ > libswscale/output.c | 2 ++ > libswscale/swscale_unscaled.c | 3 +++ > libswscale/utils.c | 6 ++++++ > tests/ref/fate/filter-pixdesc-gbrap14be | 1 + > tests/ref/fate/filter-pixdesc-gbrap14le | 1 + > tests/ref/fate/filter-pixfmts-copy | 2 ++ > tests/ref/fate/filter-pixfmts-crop | 2 ++ > tests/ref/fate/filter-pixfmts-field | 2 ++ > tests/ref/fate/filter-pixfmts-fieldorder | 2 ++ > tests/ref/fate/filter-pixfmts-hflip | 2 ++ > tests/ref/fate/filter-pixfmts-il | 2 ++ > tests/ref/fate/filter-pixfmts-null | 2 ++ > tests/ref/fate/filter-pixfmts-pad | 1 + > tests/ref/fate/filter-pixfmts-scale | 2 ++ > tests/ref/fate/filter-pixfmts-transpose | 2 ++ > tests/ref/fate/filter-pixfmts-vflip | 2 ++ > 18 files changed, 43 insertions(+) > 025cfa7df85fab9943d3049f729c25db5934eb3f 0002-swscale-add-GBRAP14-format-support.patch > From 517fc54c52cfdcdbc6920ede04b215ed27429b00 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol <onemda@gmail.com> > Date: Wed, 27 Sep 2023 16:13:16 +0200 > Subject: [PATCH 2/4] swscale: add GBRAP14 format support LGTM assuming you vissually confirmed output look correct fate tests also pass on x86 32/64 mingw32/64 (arm/mips still running, if you hear nothing more then they passed too) thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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:[~2023-09-28 10:07 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-27 17:24 Paul B Mahol 2023-09-28 10:07 ` Michael Niedermayer [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=20230928100744.GW3543730@pb2 \ --to=michael@niedermayer.cc \ --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