Mercurial > libavcodec.hg
comparison qcelpdec.c @ 9355:54bc8a2727b0 libavcodec
Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows
passing of packet-specific flags from demuxer to decoder, such as the keyframe
flag, which appears necessary to playback corePNG P-frames.
Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread
"Google Summer of Code participation" on the mailinglist.
author | rbultje |
---|---|
date | Tue, 07 Apr 2009 15:59:50 +0000 |
parents | 70c3982d0bad |
children | 0dce4fe6e6f3 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
727 av_log(avctx, AV_LOG_WARNING, "Frame #%d, IFQ: %s\n", avctx->frame_number, | 727 av_log(avctx, AV_LOG_WARNING, "Frame #%d, IFQ: %s\n", avctx->frame_number, |
728 message); | 728 message); |
729 } | 729 } |
730 | 730 |
731 static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | 731 static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
732 const uint8_t *buf, int buf_size) | 732 AVPacket *avpkt) |
733 { | 733 { |
734 const uint8_t *buf = avpkt->data; | |
735 int buf_size = avpkt->size; | |
734 QCELPContext *q = avctx->priv_data; | 736 QCELPContext *q = avctx->priv_data; |
735 float *outbuffer = data; | 737 float *outbuffer = data; |
736 int i; | 738 int i; |
737 float quantized_lspf[10], lpc[10]; | 739 float quantized_lspf[10], lpc[10]; |
738 float gain[16]; | 740 float gain[16]; |