[FFmpeg-devel] [PATCH] avcodec/alsdec: implement floating point decoding
Thilo Borgmann
thilo.borgmann at mail.de
Sat Jul 16 21:55:57 EEST 2016
Hi,
> From 70e65b26cc3f84c9c664c30808b43a5e1cf16eaa Mon Sep 17 00:00:00 2001
> From: Umair Khan <omerjerk at gmail.com>
> Date: Sat, 16 Jul 2016 23:52:39 +0530
> Subject: [PATCH 1/1] avcodec/alsdec: implement floating point decoding
>
> It conforms to RM22 version of the reference codec.
>
> Signed-off-by: Umair Khan <omerjerk at gmail.com>
> ---
> libavcodec/Makefile | 2 +-
> libavcodec/alsdec.c | 284 +++++++++++++++++++++++++++++++++++++++++-
> libavcodec/mlz.c | 171 +++++++++++++++++++++++++
> libavcodec/mlz.h | 69 ++++++++++
> libavutil/softfloat_ieee754.h | 115 +++++++++++++++++
> 5 files changed, 638 insertions(+), 3 deletions(-)
> create mode 100644 libavcodec/mlz.c
> create mode 100644 libavcodec/mlz.h
> create mode 100644 libavutil/softfloat_ieee754.h
>
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index abef19e..a03adf5 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -163,7 +163,7 @@ OBJS-$(CONFIG_ALAC_DECODER) += alac.o alac_data.o alacdsp.o
> OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o alac_data.o
> OBJS-$(CONFIG_ALIAS_PIX_DECODER) += aliaspixdec.o
> OBJS-$(CONFIG_ALIAS_PIX_ENCODER) += aliaspixenc.o
> -OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
> +OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mlz.o mpeg4audio.o
> OBJS-$(CONFIG_AMRNB_DECODER) += amrnbdec.o celp_filters.o \
> celp_math.o acelp_filters.o \
> acelp_vectors.o \
> diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
> index a7e58a2..c710fc3 100644
> --- a/libavcodec/alsdec.c
> +++ b/libavcodec/alsdec.c
> @@ -35,8 +35,11 @@
> [...]
>
> +/** multiply two softfloats and handle the rounding off
> + */
> +static SoftFloat_IEEE754 multiply(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
> [...]
Why is this in alsdec.c?
[...]
> diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c
> new file mode 100644
> index 0000000..cb2ed6a
> --- /dev/null
> +++ b/libavcodec/mlz.c
> [...]
> +static int input_code(GetBitContext* gb, int len) {
> + int tmp_code = 0;
> + int i;
> + for (i = 0; i < len; ++i) {
> + tmp_code += get_bits1(gb) << i;
> + }
> + return tmp_code;
> +}
Is there nothing in get_bits.h that solves that already?
-Thilo
More information about the ffmpeg-devel
mailing list