[FFmpeg-devel] [PATCH] avfilter/vf_tonemap: don't use NAN constant as an initializer
Michael Niedermayer
michael at niedermayer.cc
Fri Sep 8 00:16:14 EEST 2017
On Wed, Sep 06, 2017 at 10:59:13PM -0300, James Almer wrote:
> Netbsd:
> src/libavfilter/vf_tonemap.c:314: error: initializer element is not constant
> src/libavfilter/vf_tonemap.c:314: error: (near initialization for 'tonemap_options[8].default_val.dbl')
>
> DJGPP
> src/libavfilter/vf_tonemap.c:314:87: error: initializer element is not constant
> { "param", "tonemap parameter", OFFSET(param), AV_OPT_TYPE_DOUBLE, {.dbl = NAN}, DBL_MIN, DBL_MAX, FLAGS },
> ^
> src/libavfilter/vf_tonemap.c:314:87: note: (near initialization for 'tonemap_options[8].default_val.dbl')
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavfilter/vf_tonemap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c
> index 10308bdb16..d2c7ffa831 100644
> --- a/libavfilter/vf_tonemap.c
> +++ b/libavfilter/vf_tonemap.c
> @@ -311,7 +311,7 @@ static const AVOption tonemap_options[] = {
> { "reinhard", 0, 0, AV_OPT_TYPE_CONST, {.i64 = TONEMAP_REINHARD}, 0, 0, FLAGS, "tonemap" },
> { "hable", 0, 0, AV_OPT_TYPE_CONST, {.i64 = TONEMAP_HABLE}, 0, 0, FLAGS, "tonemap" },
> { "mobius", 0, 0, AV_OPT_TYPE_CONST, {.i64 = TONEMAP_MOBIUS}, 0, 0, FLAGS, "tonemap" },
> - { "param", "tonemap parameter", OFFSET(param), AV_OPT_TYPE_DOUBLE, {.dbl = NAN}, DBL_MIN, DBL_MAX, FLAGS },
> + { "param", "tonemap parameter", OFFSET(param), AV_OPT_TYPE_DOUBLE, {.dbl = nan("")}, DBL_MIN, DBL_MAX, FLAGS },
building shared libs: (seems ok with static)
on linux x86-64
src/libavfilter/vf_tonemap.c:314:108: error: initializer element is not a compile-time constant
{ "param", "tonemap parameter", __builtin_offsetof(TonemapContext, param), AV_OPT_TYPE_DOUBLE, {.dbl = nan("")}, 2.2250738585072014e-308, 1.7976931348623157e+308, 16 | (1<<16) },
^~~~~~~
1 error generated.
make: *** [libavfilter/vf_tonemap.o] Error 1
make: *** Waiting for unfinished jobs....
src/libavfilter/vf_uspp.c:253:15: warning: 'avcodec_encode_video2' is deprecated [-Wdeprecated-declarations]
ret = avcodec_encode_video2(p->avctx_enc[i], &pkt, p->frame, &got_pkt_ptr);
^
src/libavcodec/avcodec.h:5486:5: note: 'avcodec_encode_video2' has been explicitly marked deprecated here
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
^
src/libavfilter/vf_uspp.c:259:41: warning: 'coded_frame' is deprecated [-Wdeprecated-declarations]
p->frame_dec = p->avctx_enc[i]->coded_frame;
^
src/libavcodec/avcodec.h:3167:42: note: 'coded_frame' has been explicitly marked deprecated here
__attribute__((deprecated)) AVFrame *coded_frame;
^
2 warnings generated.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170907/6d510761/attachment.sig>
More information about the ffmpeg-devel
mailing list