avutil: move half-precision float helper to avutil
This commit is contained in:
parent
f921c58335
commit
b42925264a
@ -41,6 +41,7 @@
|
|||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
#include "libavutil/color_utils.h"
|
#include "libavutil/color_utils.h"
|
||||||
|
#include "libavutil/half2float.h"
|
||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
@ -53,7 +54,6 @@
|
|||||||
#include "exrdsp.h"
|
#include "exrdsp.h"
|
||||||
#include "get_bits.h"
|
#include "get_bits.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "half2float.h"
|
|
||||||
#include "mathops.h"
|
#include "mathops.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@
|
|||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "libavutil/imgutils.h"
|
#include "libavutil/imgutils.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
|
#include "libavutil/float2half.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include "codec_internal.h"
|
#include "codec_internal.h"
|
||||||
#include "encode.h"
|
#include "encode.h"
|
||||||
#include "float2half.h"
|
|
||||||
|
|
||||||
enum ExrCompr {
|
enum ExrCompr {
|
||||||
EXR_RAW,
|
EXR_RAW,
|
||||||
|
@ -21,12 +21,13 @@
|
|||||||
|
|
||||||
#include "config_components.h"
|
#include "config_components.h"
|
||||||
|
|
||||||
|
#include "libavutil/half2float.h"
|
||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "codec_internal.h"
|
#include "codec_internal.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "put_bits.h"
|
#include "put_bits.h"
|
||||||
#include "pnm.h"
|
#include "pnm.h"
|
||||||
#include "half2float.h"
|
|
||||||
|
|
||||||
static void samplecpy(uint8_t *dst, const uint8_t *src, int n, int maxval)
|
static void samplecpy(uint8_t *dst, const uint8_t *src, int n, int maxval)
|
||||||
{
|
{
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "libavutil/imgutils.h"
|
#include "libavutil/imgutils.h"
|
||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
|
#include "libavutil/float2half.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "codec_internal.h"
|
#include "codec_internal.h"
|
||||||
#include "encode.h"
|
#include "encode.h"
|
||||||
#include "float2half.h"
|
|
||||||
|
|
||||||
typedef struct PHMEncContext {
|
typedef struct PHMEncContext {
|
||||||
uint16_t basetable[512];
|
uint16_t basetable[512];
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef AVCODEC_FLOAT2HALF_H
|
#ifndef AVUTIL_FLOAT2HALF_H
|
||||||
#define AVCODEC_FLOAT2HALF_H
|
#define AVUTIL_FLOAT2HALF_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
@ -64,4 +64,4 @@ static uint16_t float2half(uint32_t f, uint16_t *basetable, uint8_t *shifttable)
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* AVCODEC_FLOAT2HALF_H */
|
#endif /* AVUTIL_FLOAT2HALF_H */
|
@ -16,8 +16,8 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef AVCODEC_HALF2FLOAT_H
|
#ifndef AVUTIL_HALF2FLOAT_H
|
||||||
#define AVCODEC_HALF2FLOAT_H
|
#define AVUTIL_HALF2FLOAT_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
@ -71,4 +71,4 @@ static uint32_t half2float(uint16_t h, const uint32_t *mantissatable, const uint
|
|||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* AVCODEC_HALF2FLOAT_H */
|
#endif /* AVUTIL_HALF2FLOAT_H */
|
Loading…
x
Reference in New Issue
Block a user