[FFmpeg-devel] [PATCH] WMAPRO packet parser
Diego Biurrun
diego
Thu Aug 14 22:11:12 CEST 2008
On Thu, Aug 14, 2008 at 08:16:38PM +0200, Sascha Sommer wrote:
>
> --- libavcodec/wma3dec.c (revision 0)
> +++ libavcodec/wma3dec.c (revision 0)
> @@ -0,0 +1,625 @@
> +/*
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
I have no idea where you got this license header from, but it is
completely wrong. Please replace it by a correct one.
> + /** Packet info */
nit: I would lowercase all these headings..
> + uint8_t packet_sequence_number; //< current packet nr
nr is the German abbreviation for number, just say 'number'.
> + uint8_t bit5; //< padding bit? (cbr files)
CBR
> + uint16_t samples_per_frame; //< nr of outputed samples
> + uint8_t log2_block_align_bits; //< nr bits for block align len
> + int8_t nb_channels; //< nr of channels
ditto
> + /* wma voice code if (decode_flags & 0x800) {
WMA
> +/**
> + *@brief initialize the decoder
Capitalize, add period.
> + if(!s->len_prefix){
> + av_log(avctx, AV_LOG_ERROR, "file has no len prefix please report\n");
I think there is a new function for such a message.
> + *@brief decode how the data in the frame is split into subframes
Capitalize.
> + * every wma frame contains the encoded data for a fixed number of
WMA
> + * samples per channel the data for every channel might be split
> + * into several subframes this function will reconstruct the list of
> + * subframes for every channel
.
> + * Afterwards for every of these channels a bit is read from the
s/every/each/
> + * next subframesize that is going to be read from the bitstream or not.
subframe size
> + * If a channel contains such a subframe the subframesize gets added to
ditto
> + * the channel's subframelist.
subframe list
> +/**
> + *@brief decode one wma frame
Capitalize, add period, WMA.
> + *@return 0 if the trailer bit indicates that this is the last frame
frame,
> + * 1 if there are more frames
.
> +/**
> + *@brief calculate remaining input buffer len
Capitalize, add period.
> +/**
> + *@brief fill the bit reservoir with a partial frame
ditto
> +/**
> + *@brief decode a single wma packet
ditto, WMA
> +/**
> + *@brief uninitialize the decoder and free all ressources
ditto
> +AVCodec wmav3pro_decoder =
> +{
> + "wmav3pro",
Is there a difference between wmav3 and wmav3pro?
> + .long_name = "Windows Media Audio 9 Professional",
NULL_IF_CONFIG_SMALL
Diego
More information about the ffmpeg-devel
mailing list