Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/libjxl.h: include version.h
@ 2024-01-23 22:29 Leo Izen
  0 siblings, 0 replies; only message in thread
From: Leo Izen @ 2024-01-23 22:29 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Leo Izen

This file has been exported since our minimum required version (0.7.0),
but it wasn't documented. Instead it was transitively included by
<jxl/decode.h> (but not jxl/encode.h), which ffmpeg relied on.

libjxl broke its API in libjxl/libjxl@66b959239355aef5255 by removing
the transitive include of version.h, and they do not plan on adding
it back. Instead they are choosing to leave the API backwards-
incompatible with downstream callers written for some fairly recent
versions of their API.

As a result, we include <jxl/version.h> to continue to build against
more recent versions of libjxl. The version macros removed are also
present in that file, so we no longer need to redefine them.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
---
 libavcodec/libjxl.h | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/libavcodec/libjxl.h b/libavcodec/libjxl.h
index e305b6e758..0b983a122f 100644
--- a/libavcodec/libjxl.h
+++ b/libavcodec/libjxl.h
@@ -27,19 +27,8 @@
 #ifndef AVCODEC_LIBJXL_H
 #define AVCODEC_LIBJXL_H
 
-#include <jxl/decode.h>
 #include <jxl/memory_manager.h>
-
-/*
- * libjxl version 0.7.0 and earlier doesn't contain these macros at all
- * so to detect version 0.7.0 versus 0.8.0 we need to define them ourselves
- */
-#ifndef JPEGXL_COMPUTE_NUMERIC_VERSION
-    #define JPEGXL_COMPUTE_NUMERIC_VERSION(major,minor,patch) ((major<<24) | (minor<<16) | (patch<<8) | 0)
-#endif
-#ifndef JPEGXL_NUMERIC_VERSION
-    #define JPEGXL_NUMERIC_VERSION JPEGXL_COMPUTE_NUMERIC_VERSION(0, 7, 0)
-#endif
+#include <jxl/version.h>
 
 /**
  * Transform threadcount in ffmpeg to one used by libjxl.
-- 
2.43.0

_______________________________________________
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".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-23 22:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23 22:29 [FFmpeg-devel] [PATCH] avcodec/libjxl.h: include version.h Leo Izen

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