[Ffmpeg-devel] THP decoder

Kislyakov Maxim spidy
Fri Apr 6 18:05:38 CEST 2007


Hi,

Michael Niedermayer wrote:

>> +/*THP format description*/
> comment is still not doxygen compatible
fixed

>> +    if (p->buf[0] == 'T' && p->buf[1] == 'H' && p->buf[2] == 'P' && p->buf[3] == '\0') {
> still not using simpler AV_RL32(p->buf) and MKTAG
replaced

>> +    if (*header != 0x00504854) {
>> +        return AVERROR_NOFMT;
>> +    }
> 
> this is still wrong
fixed

>> +    thpDemux->videoStreamIndex = 0; /* Always should be zero */
> 
> useless
removed

>> +    st->codec->sample_rate = av_q2d(thpDemux->fps);
> 
> still looks wrong
fixed

>> +        thpDemux->audioStreamIndex = 1; /* Always should be one*/
> 
> also useless
removed

>> +    signed int factor1;
> 
> superflouos signed
removed

>> +        src += 8;
>> +        int16_t tempCell;
> this still breaks gcc 2.95
I hope fixed.

>> +                frameHeader->table[n][i] = (src[1] + (src[0] << 8));
>> +                src += 2;
> 
> bytestream_get_be16()
used get_bits like in ADPCM_SWF codec

New patch is here. Please have a look

Maxim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thp-patchv4.diff
Type: application/octet-stream
Size: 11904 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070406/39ac94d5/attachment.obj>



More information about the ffmpeg-devel mailing list