On Sun, Jul 17, 2016 at 09:00:48AM +0530, Umair Khan wrote: > Hi, > > On Sun, Jul 17, 2016 at 12:25 AM, Thilo Borgmann <thilo.borgm...@mail.de> > wrote: > > Hi, > > > >> From 70e65b26cc3f84c9c664c30808b43a5e1cf16eaa Mon Sep 17 00:00:00 2001 > >> From: Umair Khan <omerj...@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 <omerj...@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? > > This is not the actual IEEE 754 multiplication. It is as is mentioned > in the reference spec. > The typical one for 754 floats, I've implemented here separately - > https://github.com/omerjerk/FFmpeg/commit/d6cd4bf66b9da46dd87580d7d974ce44abdcfba2#diff-4dd4b2d8d523f336fbefa96e9252187cR93 > > > [...] > > > >> 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 > > I'm not sure. It is just reading the bits in the reverse order. May be > someone else can help.
theres asv2_get_bits() if it works here it could be shared [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel