mpv icon indicating copy to clipboard operation
mpv copied to clipboard

warning: ‘tone_mapping_param’ is deprecated

Open diederikdehaas opened this issue 1 year ago • 1 comments

Important Information

- mpv version: 0.38
- Platform version: Debian Testing/Sid
- Meson version: 1.5.1

Reproduction Steps

When building Debian's 0.38 version + the patch set from https://github.com/mpv-player/mpv/pull/14690 I noticed the following:

[262/315] ccache cc -Ilibmpv.so.2.3.0.p -I. -I.. -Icommon -Ietc -Iplayer/javascript -Iplayer/lua -Isub -Ivideo/out -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -I/usr/include/lua5.2 -I/usr/include/SDL2 -I/usr/include/uchardet -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/libdrm -I/usr/include/sixel -fvisibility=hidden -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -std=c11 -D_FILE_OFFSET_BITS=64 -Werror=implicit-function-declaration -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-cast-function-type -Wempty-body -Wdisabled-optimization -Wstrict-prototypes -Wno-format-zero-length -Wno-redundant-decls -Wvla -Wno-format-truncation -Wimplicit-fallthrough -fno-math-errno -Wformat -Werror=format-security -Wundef -Wmissing-prototypes -Wshadow -Wno-switch -Wparentheses -Wpointer-arith -Wno-pointer-sign -Wno-unused-result -D_GNU_SOURCE -DNO_BUILD_TIMESTAMPS -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/home/diederik/dev/debian/salsa/multimedia-team/mpv=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -pthread -MD -MQ libmpv.so.2.3.0.p/video_out_vo_gpu_next.c.o -MF libmpv.so.2.3.0.p/video_out_vo_gpu_next.c.o.d -o libmpv.so.2.3.0.p/video_out_vo_gpu_next.c.o -c ../video/out/vo_gpu_next.c
../video/out/vo_gpu_next.c: In function ‘update_render_options’:
../video/out/vo_gpu_next.c:2217:5: warning: ‘tone_mapping_param’ is deprecated [-Wdeprecated-declarations]
 2217 |     pars->color_map_params.tone_mapping_param = opts->tone_map.curve_param;
      |     ^~~~
In file included from /usr/include/libplacebo/renderer.h:25,
                 from /usr/include/libplacebo/options.h:21,
                 from ../video/out/vo_gpu_next.c:26:
/usr/include/libplacebo/shaders/colorspace.h:303:36: note: declared here
  303 |     PL_DEPRECATED_IN(v6.311) float tone_mapping_param;        // see `tone_constants`
      |                                    ^~~~~~~~~~~~~~~~~~
../video/out/vo_gpu_next.c:2218:5: warning: ‘tone_mapping_param’ is deprecated [-Wdeprecated-declarations]
 2218 |     if (isnan(pars->color_map_params.tone_mapping_param)) // vo_gpu compatibility
      |     ^~
/usr/include/libplacebo/shaders/colorspace.h:303:36: note: declared here
  303 |     PL_DEPRECATED_IN(v6.311) float tone_mapping_param;        // see `tone_constants`
      |                                    ^~~~~~~~~~~~~~~~~~
../video/out/vo_gpu_next.c:2219:9: warning: ‘tone_mapping_param’ is deprecated [-Wdeprecated-declarations]
 2219 |         pars->color_map_params.tone_mapping_param = 0.0;
      |         ^~~~
/usr/include/libplacebo/shaders/colorspace.h:303:36: note: declared here
  303 |     PL_DEPRECATED_IN(v6.311) float tone_mapping_param;        // see `tone_constants`
      |                                    ^~~~~~~~~~~~~~~~~~

It isn't related to that PR though as I found the same issue in the log of the official Debian buildd: https://buildd.debian.org/status/fetch.php?pkg=mpv&arch=amd64&ver=0.38.0-1%2Bb1&stamp=1722255337&raw=0

I did find https://github.com/mpv-player/mpv/pull/12195 which also seems related to libplacebo deprecations, but possibly an earlier one?

BTW: I lied below about testing it with the latest version as PR 12195 is the most recent code change and that was part of 0.37 already.
Furthermore, the above warning is present in your own build logs too: https://github.com/mpv-player/mpv/actions/runs/10445387357/job/28921260649

Expected Behavior

Build without warnings

Actual Behavior

Build with warnings

Log File

mpv_0.38.0-3_amd64.build.zip

I carefully read all instruction and confirm that I did the following:

  • [X] I tested with the latest mpv version to validate that the issue is not already fixed.
  • [X] I provided all required information including system and mpv version.
  • [X] I produced the log file with the exact same set of parameters, and conditions used in "Reproduction Steps".
  • [X] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • [X] I attached the full, untruncated log file.

diederikdehaas avatar Aug 19 '24 14:08 diederikdehaas

This is known, and not really a priority atm since the deprecated fields aren't going away anytime soon as far as I understand.

llyyr avatar Aug 19 '24 14:08 llyyr