Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Timo Rothenpieler <timo@rothenpieler.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Timo Rothenpieler <timo@rothenpieler.org>
Subject: [FFmpeg-devel] [PATCH v2 1/7] avutil: move half-precision float helper to avutil
Date: Sun, 14 Aug 2022 18:48:27 +0200
Message-ID: <20220814164833.19965-1-timo@rothenpieler.org> (raw)

---
 libavcodec/exr.c                       | 2 +-
 libavcodec/exrenc.c                    | 2 +-
 libavcodec/pnmdec.c                    | 3 ++-
 libavcodec/pnmenc.c                    | 2 +-
 {libavcodec => libavutil}/float2half.h | 6 +++---
 {libavcodec => libavutil}/half2float.h | 6 +++---
 6 files changed, 11 insertions(+), 10 deletions(-)
 rename {libavcodec => libavutil}/float2half.h (96%)
 rename {libavcodec => libavutil}/half2float.h (96%)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 3a6b9c3014..5c6ca9adbf 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -41,6 +41,7 @@
 #include "libavutil/avstring.h"
 #include "libavutil/opt.h"
 #include "libavutil/color_utils.h"
+#include "libavutil/half2float.h"
 
 #include "avcodec.h"
 #include "bytestream.h"
@@ -53,7 +54,6 @@
 #include "exrdsp.h"
 #include "get_bits.h"
 #include "internal.h"
-#include "half2float.h"
 #include "mathops.h"
 #include "thread.h"
 
diff --git a/libavcodec/exrenc.c b/libavcodec/exrenc.c
index 8cf7827bb6..56c084d483 100644
--- a/libavcodec/exrenc.c
+++ b/libavcodec/exrenc.c
@@ -31,11 +31,11 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/pixdesc.h"
+#include "libavutil/float2half.h"
 #include "avcodec.h"
 #include "bytestream.h"
 #include "codec_internal.h"
 #include "encode.h"
-#include "float2half.h"
 
 enum ExrCompr {
     EXR_RAW,
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index 130407df25..9383dc8e60 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -21,12 +21,13 @@
 
 #include "config_components.h"
 
+#include "libavutil/half2float.h"
+
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "internal.h"
 #include "put_bits.h"
 #include "pnm.h"
-#include "half2float.h"
 
 static void samplecpy(uint8_t *dst, const uint8_t *src, int n, int maxval)
 {
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index b16c93c88f..7ce534d06e 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -24,10 +24,10 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/pixdesc.h"
+#include "libavutil/float2half.h"
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "encode.h"
-#include "float2half.h"
 
 typedef struct PHMEncContext {
     uint16_t basetable[512];
diff --git a/libavcodec/float2half.h b/libavutil/float2half.h
similarity index 96%
rename from libavcodec/float2half.h
rename to libavutil/float2half.h
index e05125088c..d6aaab8278 100644
--- a/libavcodec/float2half.h
+++ b/libavutil/float2half.h
@@ -16,8 +16,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_FLOAT2HALF_H
-#define AVCODEC_FLOAT2HALF_H
+#ifndef AVUTIL_FLOAT2HALF_H
+#define AVUTIL_FLOAT2HALF_H
 
 #include <stdint.h>
 
@@ -64,4 +64,4 @@ static uint16_t float2half(uint32_t f, uint16_t *basetable, uint8_t *shifttable)
     return h;
 }
 
-#endif /* AVCODEC_FLOAT2HALF_H */
+#endif /* AVUTIL_FLOAT2HALF_H */
diff --git a/libavcodec/half2float.h b/libavutil/half2float.h
similarity index 96%
rename from libavcodec/half2float.h
rename to libavutil/half2float.h
index 7df6747e50..1f6deade07 100644
--- a/libavcodec/half2float.h
+++ b/libavutil/half2float.h
@@ -16,8 +16,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_HALF2FLOAT_H
-#define AVCODEC_HALF2FLOAT_H
+#ifndef AVUTIL_HALF2FLOAT_H
+#define AVUTIL_HALF2FLOAT_H
 
 #include <stdint.h>
 
@@ -71,4 +71,4 @@ static uint32_t half2float(uint16_t h, const uint32_t *mantissatable, const uint
     return f;
 }
 
-#endif /* AVCODEC_HALF2FLOAT_H */
+#endif /* AVUTIL_HALF2FLOAT_H */
-- 
2.34.1

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

             reply	other threads:[~2022-08-14 16:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14 16:48 Timo Rothenpieler [this message]
2022-08-14 16:48 ` [FFmpeg-devel] [PATCH v2 2/7] avutil/half2float: adjust conversion of NaN Timo Rothenpieler
2022-08-18  8:51   ` Tomas Härdin
2022-08-14 16:48 ` [FFmpeg-devel] [PATCH v2 3/7] avutil/half2float: move tables to header-internal structs Timo Rothenpieler
2022-08-14 16:48 ` [FFmpeg-devel] [PATCH v2 4/7] avutil/half2float: move non-inline init code out of header Timo Rothenpieler
2022-08-14 16:48 ` [FFmpeg-devel] [PATCH v2 5/7] avutil/half2float: use native _Float16 if available Timo Rothenpieler
2022-08-14 16:48 ` [FFmpeg-devel] [PATCH v2 6/7] swscale: add opaque parameter to input functions Timo Rothenpieler
2022-08-14 16:48 ` [FFmpeg-devel] [PATCH v2 7/7] swscale/input: add rgbaf16 input support Timo Rothenpieler
2022-08-14 23:15   ` Leo Izen
2022-08-15  4:15     ` Andreas Rheinhardt
2022-08-18 15:37 ` [FFmpeg-devel] [PATCH v2 1/7] avutil: move half-precision float helper to avutil Timo Rothenpieler
2022-08-19 21:21   ` Timo Rothenpieler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220814164833.19965-1-timo@rothenpieler.org \
    --to=timo@rothenpieler.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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