comparison ac3enc.c @ 5089:bff60ecc02f9 libavcodec

Use AV_xx throughout libavcodec
author ramiro
date Sat, 02 Jun 2007 01:41:07 +0000
parents 1d8b06947276
children b24bcdd0ae86
comparison
equal deleted inserted replaced
5088:8e206208db1f 5089:bff60ecc02f9
1134 frame_size_58 = (frame_size >> 1) + (frame_size >> 3); 1134 frame_size_58 = (frame_size >> 1) + (frame_size >> 3);
1135 crc1 = bswap_16(av_crc(av_crc8005, 0, frame + 4, 2 * frame_size_58 - 4)); 1135 crc1 = bswap_16(av_crc(av_crc8005, 0, frame + 4, 2 * frame_size_58 - 4));
1136 /* XXX: could precompute crc_inv */ 1136 /* XXX: could precompute crc_inv */
1137 crc_inv = pow_poly((CRC16_POLY >> 1), (16 * frame_size_58) - 16, CRC16_POLY); 1137 crc_inv = pow_poly((CRC16_POLY >> 1), (16 * frame_size_58) - 16, CRC16_POLY);
1138 crc1 = mul_poly(crc_inv, crc1, CRC16_POLY); 1138 crc1 = mul_poly(crc_inv, crc1, CRC16_POLY);
1139 frame[2] = crc1 >> 8; 1139 AV_WB16(frame+2,crc1);
1140 frame[3] = crc1;
1141 1140
1142 crc2 = bswap_16(av_crc(av_crc8005, 0, frame + 2 * frame_size_58, (frame_size - frame_size_58) * 2 - 2)); 1141 crc2 = bswap_16(av_crc(av_crc8005, 0, frame + 2 * frame_size_58, (frame_size - frame_size_58) * 2 - 2));
1143 frame[2*frame_size - 2] = crc2 >> 8; 1142 AV_WB16(frame+2*frame_size-2,crc2);
1144 frame[2*frame_size - 1] = crc2;
1145 1143
1146 // printf("n=%d frame_size=%d\n", n, frame_size); 1144 // printf("n=%d frame_size=%d\n", n, frame_size);
1147 return frame_size * 2; 1145 return frame_size * 2;
1148 } 1146 }
1149 1147