On Sun, Dec 02, 2018 at 01:52:49PM +0100, Martin Vignali wrote: > Hello, > > New patch in attach > > 001 : add ff_int_is_in_list func to libavcodec/utils.c > 002 : add vendor option (unchanged) > 003 : only write color properties if supported (use new ff_int_is_in_list > func) > 004 : Add 444Xq (unchanged) > > Martin
> proresenc_anatoliy.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > 8ba4720a3b18d2ee2f865463d5ad402ba7a04a4b > 0003-avcodec-prores_aw-only-set-color-prim-trc-space.patch > From 219d1a49472712d601dc722a2719abf547321c32 Mon Sep 17 00:00:00 2001 > From: Martin Vignali <martin.vign...@gmail.com> > Date: Sun, 2 Dec 2018 13:40:02 +0100 > Subject: [PATCH 3/4] avcodec/prores_aw : only set color prim, trc, space > values if supported > > set to unspecified if frame have another value > --- > libavcodec/proresenc_anatoliy.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c > index 8047f1c242..6263d2b83b 100644 > --- a/libavcodec/proresenc_anatoliy.c > +++ b/libavcodec/proresenc_anatoliy.c > @@ -52,6 +52,12 @@ static const int qp_start_table[5] = { 8, 3, 2, 1, 1}; > static const int qp_end_table[5] = { 13, 9, 6, 6, 5}; > static const int bitrate_table[5] = { 1000, 2100, 3500, 5400, 7000}; > > +static int valid_primaries[9] = { AVCOL_PRI_RESERVED0, AVCOL_PRI_BT709, > AVCOL_PRI_UNSPECIFIED, AVCOL_PRI_BT470BG, > + AVCOL_PRI_SMPTE170M, AVCOL_PRI_BT2020, > AVCOL_PRI_SMPTE431, AVCOL_PRI_SMPTE432,INT_MAX }; > +static int valid_trc[4] = { AVCOL_TRC_RESERVED0, AVCOL_TRC_BT709, > AVCOL_TRC_UNSPECIFIED, INT_MAX }; > +static int valid_colorspace[5] = { AVCOL_SPC_BT709, AVCOL_SPC_UNSPECIFIED, > AVCOL_SPC_SMPTE170M, > + AVCOL_SPC_BT2020_NCL, INT_MAX }; these should be const static [...] > internal.h | 12 ++++++++++++ > utils.c | 19 +++++++++++++++++++ > 2 files changed, 31 insertions(+) > 1d57ba15526595e41879dc1b4aa65444941e4d68 > 0001-avcodec-utils-add-ff_int_is_in_list-func.patch > From 3489b650f90c62ecf621f4f930239bb639515aca Mon Sep 17 00:00:00 2001 > From: Martin Vignali <martin.vign...@gmail.com> > Date: Sun, 2 Dec 2018 13:28:33 +0100 > Subject: [PATCH 1/4] avcodec/utils : add ff_int_is_in_list func > > to check valid value, or return default_value > --- > libavcodec/internal.h | 12 ++++++++++++ > libavcodec/utils.c | 19 +++++++++++++++++++ > 2 files changed, 31 insertions(+) > > diff --git a/libavcodec/internal.h b/libavcodec/internal.h > index 0c2133f092..03f1d29bc2 100644 > --- a/libavcodec/internal.h > +++ b/libavcodec/internal.h > @@ -404,6 +404,18 @@ int ff_alloc_a53_sei(const AVFrame *frame, size_t > prefix_len, > */ > int64_t ff_guess_coded_bitrate(AVCodecContext *avctx); > > +/** > + * Check if a value is in the list. If not, return the default value > + * > + * @param ctx Context for the log msg > + * @param val_name Name of the checked value, for log msg > + * @param array_valid_values Array of valid int, ended with INT_MAX > + * @param default_value Value return if checked value is not in the > array > + * @return Value or default_value. > + */ > +int ff_int_is_in_list(void *ctx, const char * val_name, int val, > + int * array_valid_values, int default_value); maybe ff_int_from_list_or_default() is a clearer name, what do you think ? but iam fine with either, just wondering thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel