[Ffmpeg-devel] THP decoder
Michael Niedermayer
michaelni
Sat Apr 7 16:54:31 CEST 2007
Hi
On Sat, Apr 07, 2007 at 05:55:08PM +0400, Kislyakov Maxim wrote:
> > Hello,
>
> Hi
>
> Reimar Doeffinger wrote:
> > On Sat, Apr 07, 2007 at 05:27:54PM +0400, Kislyakov Maxim wrote:
> >> Michael Niedermayer wrote:
> >> > no, they are doxygen comments now but they are still wrong
> >>
> >> I hope now it is ok, may be i should remove all comments? =)
> >> if (no)
> >> HOW_TO_WRITE_THEM;
> >> else
> >> THANKS;
> >
> > ///-comments AFAIK apply to the next line, but these are for the thing
> > to the left. Checking other files like avformat.h indicates that
> > ///< is the right style.
>
> fixed
> New patch attached (9th this time)
>
[...]
> + get_be32(pb); ///< Skipping magic bytes
doxygen doesnt support comments placed like that
> + version = get_le32(pb);
> + if (version != 0x100 && version != 0x110)
> + return AVERROR_IO; ///< Incorrect version
what is this check good for?
[...]
> + if (thpDemux->componentTypes[0] == 0) {
> + st->codec->width = get_be32(pb);
> + st->codec->height = get_be32(pb);
> + if (version == 0x110)
> + get_be32(pb);
> + }
what if video is not the first component?
[...]
> + thpDemux->curFrame = thpDemux->firstFrameOffset;
> + thpDemux->frameSize = thpDemux->firstFrameSize;
what are the first* variables good for? why not read in the correct ones
directly?
[...]
> + pkt->stream_index = 1;
this is wrong if there is no video (i dont know if that can occure but your
demuxer is checking for the case so i assume it can)
[...]
> +static inline short adpcm_thp_expand_nibble(ADPCMThpFrameHeader *fh, int8_t nibble,
> + uint8_t index, uint8_t exponent, int st)
> +{
> + short temp = 0;
> + int factor1, factor2;
> + if (nibble & 0x08) {
> + nibble = nibble | 0xf0;
|=
> + }
superfluous {}
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070407/a0caa6fd/attachment.pgp>
More information about the ffmpeg-devel
mailing list