On Mon, Mar 10, 2014 at 06:00:54PM +0100, Vittorio Giovara wrote:
> From: Paul B Mahol <[email protected]>
>
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---
> Which is an ADPCM decoder, so I had to move it around and place it in
> the right decoder list.
> Vittorio
>
> doc/general.texi | 2 +
> libavcodec/Makefile | 1 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/avcodec.h | 1 +
> libavcodec/version.h | 2 +-
> libavcodec/vima.c | 231
> +++++++++++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 237 insertions(+), 1 deletion(-)
> create mode 100644 libavcodec/vima.c
Does this compile standalone?
Changelog entry is sort of missing. You added it to the demuxer instead.
> --- /dev/null
> +++ b/libavcodec/vima.c
> @@ -0,0 +1,231 @@
> +
> +#include "libavutil/channel_layout.h"
> +#include "avcodec.h"
> +#include "get_bits.h"
> +#include "internal.h"
> +#include "adpcm_data.h"
canonical ordering
> +static int decode_frame(AVCodecContext *avctx, void *data,
> + int *got_frame_ptr, AVPacket *pkt)
> +{
> + GetBitContext gb;
> + AVFrame *frame = data;
> + int16_t pcm_data[2];
> + uint32_t samples;
> + int8_t channel_hint[2];
> + int ret, chan, channels = 1;
nit: looks weird IMO
> + avctx->channels = channels;
> + avctx->channel_layout = (channels == 2) ? AV_CH_LAYOUT_STEREO :
> + AV_CH_LAYOUT_MONO;
align, move : below ?
> + if (channels > 1) {
> + channel_hint[1] = get_sbits(&gb, 8);
> + pcm_data[1] = get_sbits(&gb, 16);
align
> + for (chan = 0; chan < channels; chan++) {
> + uint16_t *dest = (uint16_t*)frame->data[0] + chan;
(uint16_t *) frame->data[0] + chan;
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel