mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-03-01 10:35:23 +00:00
dvb_math functions moved to int_log
This commit is contained in:
parent
adaeb94a54
commit
327cc09d34
@ -1,3 +1,4 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
/*
|
/*
|
||||||
* dvb-math provides some complex fixed-point math
|
* dvb-math provides some complex fixed-point math
|
||||||
* operations shared between the dvb related stuff
|
* operations shared between the dvb related stuff
|
||||||
@ -15,6 +16,7 @@
|
|||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if (KERNEL_VERSION(6, 6, 0) > LINUX_VERSION_CODE)
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@ -139,3 +141,6 @@ unsigned int intlog10(u32 value)
|
|||||||
return (log * 646456993) >> 31;
|
return (log * 646456993) >> 31;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(intlog10);
|
EXPORT_SYMBOL(intlog10);
|
||||||
|
#else
|
||||||
|
#include <linux/int_log.h>
|
||||||
|
#endif
|
||||||
|
@ -36,7 +36,11 @@
|
|||||||
#include <asm/div64.h>
|
#include <asm/div64.h>
|
||||||
|
|
||||||
#include <media/dvb_frontend.h>
|
#include <media/dvb_frontend.h>
|
||||||
|
#if (KERNEL_VERSION(6, 6, 0) > LINUX_VERSION_CODE)
|
||||||
#include <media/dvb_math.h>
|
#include <media/dvb_math.h>
|
||||||
|
#else
|
||||||
|
#include <linux/int_log.h>
|
||||||
|
#endif
|
||||||
#include "cxd2843.h"
|
#include "cxd2843.h"
|
||||||
|
|
||||||
#define Log10x100(x) ((s32)(((((u64) intlog2(x) * 0x1e1a5e2e) >> 47 ) + 1) >> 1))
|
#define Log10x100(x) ((s32)(((((u64) intlog2(x) * 0x1e1a5e2e) >> 47 ) + 1) >> 1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user