On Tue, Feb 10, 2015 at 05:54:56PM +0100, Oleksij Rempel wrote:
> --- a/Changelog
> +++ b/Changelog
> @@ -12,6 +12,7 @@ version <next>:
> - VP8 in Ogg demuxing
> - OpenH264 encoder wrapper
> - Support DNx100 (960x720@8)
> +- DSS_SP decoder
DSS SP
> --- a/doc/general.texi
> +++ b/doc/general.texi
> @@ -834,6 +834,8 @@ following image formats are supported:
> @item DSP Group TrueSpeech @tab @tab X
> +@item DSS SP @tab @tab X
> + @tab Part of Digital Speech Standard.
> @item DV audio @tab @tab X
> --- a/libavcodec/codec_desc.c
> +++ b/libavcodec/codec_desc.c
> @@ -2202,6 +2202,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
> {
> + .id = AV_CODEC_ID_DSS_SP,
> + .type = AVMEDIA_TYPE_AUDIO,
> + .name = "dss_sp",
> + .long_name = NULL_IF_CONFIG_SMALL("DSS SP"),
> + .props = AV_CODEC_PROP_LOSSY,
> + },
> --- /dev/null
> +++ b/libavcodec/dss_sp.c
> @@ -0,0 +1,780 @@
> +/*
> + * Digital Speech Standard - Standard Play Mode (DSS SP) audio decoder
> + * Copyright (C) 2014 Oleksij Rempel <[email protected]>
> + */
> +
> +AVCodec ff_dss_sp_decoder = {
> + .name = "dss_sp",
> + .long_name = NULL_IF_CONFIG_SMALL("Digital Speech Standard -
> Standard Play mode decoder (DSS SP)"),
> +};
These names should agree, especially the two long names.
> --- /dev/null
> +++ b/libavcodec/dss_sp.c
> @@ -0,0 +1,780 @@
> +/*
> + * Digital Speech Standard - Standard Play Mode (DSS SP) audio decoder
> + * Copyright (C) 2014 Oleksij Rempel <[email protected]>
> + */
> +
> +#include "libavutil/common.h"
> +#include "libavutil/channel_layout.h"
> +#include "libavutil/mem.h"
> +#include "libavutil/opt.h"
nit: order
> +static const int16_t dss_sp_fixed_cb_gain[64] = {
> + 0, 4, 8, 13, 17, 22, 26, 31,
> + 35, 40, 44, 48, 53, 58, 63, 69,
> + 76, 83, 91, 99, 109, 119, 130, 142,
> + 155, 170, 185, 203, 222, 242, 265, 290,
> + 317, 346, 378, 414, 452, 494, 540, 591,
> + 646, 706, 771, 843, 922, 1007, 1101, 1204,
> + 1316, 1438, 1572, 1719, 1879, 2053, 2244, 2453,
> + 2682, 2931, 3204, 3502, 3828, 4184, 4574, 5000,
> +};
> +
> +static const int16_t binary_decreasing_array[] = {
> + 32767, 16384, 8192, 4096, 2048, 1024, 512, 256,
> + 128, 64, 32, 16, 8, 4, 2,
> +};
> +
> +static const int16_t dss_sp_unc_decreasing_array[] = {
> + 32767, 26214, 20972, 16777, 13422, 10737, 8590, 6872,
> + 5498, 4398, 3518, 2815, 2252, 1801, 1441,
> +};
> +
> +static const int16_t dss_sp_adaptive_gain[] = {
> + 102, 231, 360, 488, 617, 746, 875, 1004,
> + 1133, 1261, 1390, 1519, 1648, 1777, 1905, 2034,
> + 2163, 2292, 2421, 2550, 2678, 2807, 2936, 3065,
> + 3194, 3323, 3451, 3580, 3709, 3838, 3967, 4096,
> +};
Why signed types for unsigned values?
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel