[FFmpeg-devel] [PATCH] Set correct frame_size for Speex decoding
Sat Aug 1 00:48:59 CEST 2009
Michael Niedermayer wrote:
> On Thu, Jul 30, 2009 at 07:25:17PM -0400, Justin Ruggles wrote:
>> Justin Ruggles wrote:
>>> Currently AVCodecContext.frame_size is not set correctly for Speex.
>>> Since the Ogg and FLV demuxers and the libspeex decoder handle a full
>>> packet as a single frame, frame_size should be set to the Speex
>>> frame_size * frames_per_packet.
>>> If frames_per_packet is not specified in the Speex header, or if there
>>> is no header, it can be determined after decoding the first packet.
>>> Stream copy is not implemented yet for Speex, but once it is, a parser
>>> will be able to set all the stream parameters instead of the decoder
>>> when the header is missing or incomplete.
> it might be helpfull if you say who you expect to review this
In general, I'm looking for an ok on having lavf and lavc treat a whole
Speex packet as a single frame. After considering and trying to code
the split-then-join idea it did not seem like a very clean solution, and
it is not really necessary. This is my general plan:
demuxer: - get frames_per_packet from header if header is present
- get frames_per_packet from parser if header is not present
parser: - does not split, but parses packets to determine
frames_per_packet and other stream parameters
decoder: - if necessary, get frames_per_packet from decoding 1st packet
- decode all frames in the packet (as is done currently)
encoder: - determine frames_per_packet by user setting avctx.frame_size.
(e.g. for wideband, frame_size = 320 * frames_per_packet)
muxer: - determine frames_per_packet from avctx.frame_size
It seems that David Conrad maintains the Ogg demuxer. He is not listed
as maintainer for libspeexdec.c, but he wrote it so I think he could
review that part as well.
More information about the ffmpeg-devel