Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-29 04:08:54 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-10-29 04:08:54 +0400
commit6faf0a21e18f314c48a886864145abe715be6572 (patch)
treef67c3e543a8b2c3283875881536d0a69da515e5e /libavcodec/nellymoserenc.c
parented1aa8921749a1c70d4453326da7f7b5a6f6f6e7 (diff)
parent61856d06eb30955290911140e6745bad93a25323 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (53 commits) probe: Restore identification of files with very large id3 tags and no extension. probe: Remove id3 tag presence as a criteria to do file extension checking. mpegts: MP4 SL support mpegts: MP4 OD support mpegts: Add support for Sections in PMT mpegts: Replace the MP4 descriptor parser with a recursive parser. mpegts: Add support for multiple mp4 descriptors mpegts: Parse mpeg2 SL descriptors. isom: Add MPEG4SYSTEMS dummy object type indication. aacdec: allow output reconfiguration on channel changes nellymoserenc: take float input samples instead of int16 nellymoserdec: use dsp functions for overlap and windowing nellymoserdec: do not fail if there is extra data in the packet nellymoserdec: fail if output buffer is too small nellymoserdec: remove pointless buffer size check. lavf: add init_put_byte() to the list of visible symbols. seek-test: free options dictionary after use snow: do not draw_edge if emu_edge is set tools/pktdumper: update to recent avformat api seek-test: update to recent avformat api ... Conflicts: doc/APIchanges libavcodec/mpegaudiodec.c libavcodec/nellymoserdec.c libavcodec/snow.c libavcodec/version.h libavcodec/wmadec.c libavformat/avformat.h libavformat/mpegts.c libavformat/mxfdec.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/nellymoserenc.c')
-rw-r--r--libavcodec/nellymoserenc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 1d35cda9a1..5af1c5c6ca 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -146,7 +146,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx->frame_size = NELLY_SAMPLES;
s->avctx = avctx;
- ff_mdct_init(&s->mdct_ctx, 8, 0, 1.0);
+ ff_mdct_init(&s->mdct_ctx, 8, 0, 32768.0);
dsputil_init(&s->dsp, avctx);
/* Generate overlap window */
@@ -352,17 +352,15 @@ static void encode_block(NellyMoserEncodeContext *s, unsigned char *output, int
static int encode_frame(AVCodecContext *avctx, uint8_t *frame, int buf_size, void *data)
{
NellyMoserEncodeContext *s = avctx->priv_data;
- const int16_t *samples = data;
+ const float *samples = data;
int i;
if (s->last_frame)
return 0;
if (data) {
- for (i = 0; i < avctx->frame_size; i++) {
- s->buf[s->bufsel][i] = samples[i];
- }
- for (; i < NELLY_SAMPLES; i++) {
+ memcpy(s->buf[s->bufsel], samples, avctx->frame_size * sizeof(*samples));
+ for (i = avctx->frame_size; i < NELLY_SAMPLES; i++) {
s->buf[s->bufsel][i] = 0;
}
s->bufsel = 1 - s->bufsel;
@@ -393,5 +391,5 @@ AVCodec ff_nellymoser_encoder = {
.close = encode_end,
.capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
.long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
- .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
+ .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
};