Commit 795bb9dc authored by Michael Niedermayer's avatar Michael Niedermayer

Export svq1_packet_checksum() that is needed for svq3 watermarks,

patch by baptiste that is based on reverse engineering work by chrono.

Originally committed as revision 15617 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1fdcdf8d
......@@ -540,7 +540,7 @@ static int svq1_decode_delta_block (MpegEncContext *s, GetBitContext *bitbuf,
return result;
}
static uint16_t svq1_packet_checksum (const uint8_t *data, const int length, int value) {
uint16_t ff_svq1_packet_checksum (const uint8_t *data, const int length, int value) {
int i;
for (i=0; i < length; i++) {
......@@ -581,7 +581,7 @@ static int svq1_decode_frame_header (GetBitContext *bitbuf,MpegEncContext *s) {
if (s->f_code == 0x50 || s->f_code == 0x60) {
int csum = get_bits (bitbuf, 16);
csum = svq1_packet_checksum (bitbuf->buffer, bitbuf->size_in_bits>>3, csum);
csum = ff_svq1_packet_checksum (bitbuf->buffer, bitbuf->size_in_bits>>3, csum);
// av_log(s->avctx, AV_LOG_INFO, "%s checksum (%02x) for packet data\n",
// (csum == 0) ? "correct" : "incorrect", csum);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment