[FFmpeg-devel] [PATCH 1/2] avcodec/ffv1enc: Add enum for qtable
Michael Niedermayer
michael at niedermayer.cc
Mon Dec 2 03:20:04 EET 2024
Hi
On Sat, Nov 30, 2024 at 04:22:13PM +0900, Lynne via ffmpeg-devel wrote:
> On 30/11/2024 04:33, Michael Niedermayer wrote:
>
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavcodec/ffv1enc.c | 14 +++++++++++++-
> > 1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
> > index c96c71b1096..742db549e5f 100644
> > --- a/libavcodec/ffv1enc.c
> > +++ b/libavcodec/ffv1enc.c
> > @@ -41,6 +41,12 @@
> > #include "ffv1.h"
> > #include "ffv1enc.h"
> > +enum {
> > + QTABLE_DEFAULT = -1,
> > + QTABLE_8BIT,
> > + QTABLE_GT8BIT,
> > +};
> > +
> > static const int8_t quant5_10bit[256] = {
> > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
> > 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
> > @@ -1346,7 +1352,13 @@ static const AVOption options[] = {
> > { "context", "Context model", OFFSET(context_model), AV_OPT_TYPE_INT,
> > { .i64 = 0 }, 0, 1, VE },
> > { "qtable", "Quantization table", OFFSET(qtable), AV_OPT_TYPE_INT,
> > - { .i64 = -1 }, -1, 2, VE },
> > + { .i64 = -1 }, -1, 2, VE , .unit = "qtable"},
> > + { "default", NULL, 0, AV_OPT_TYPE_CONST,
> > + { .i64 = QTABLE_DEFAULT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
> > + { "8bit", NULL, 0, AV_OPT_TYPE_CONST,
> > + { .i64 = QTABLE_8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
> > + { "greater8bit", NULL, 0, AV_OPT_TYPE_CONST,
> > + { .i64 = QTABLE_GT8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
> > { NULL }
> > };
>
>
> Could you apply this to ffv1enc_vulkan.c as well? It uses the same
> quantization table
ok, but i dont have a working vulkan setup so i cannot really test this
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241202/c3405978/attachment.sig>
More information about the ffmpeg-devel
mailing list