1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

Merge commit '3b08d9d932eef09403074d5af31e10d8011e840b'

* commit '3b08d9d932eef09403074d5af31e10d8011e840b':
  testprogs: K&R formatting cosmetics

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis
2016-04-21 16:40:10 +01:00
8 changed files with 474 additions and 389 deletions

View File

@@ -19,8 +19,9 @@
*/
#include "config.h"
#include "common.h"
#include "bswap.h"
#include "common.h"
#include "crc.h"
#if CONFIG_HARDCODED_TABLES
@@ -332,7 +333,7 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size)
if (ctx_size >= sizeof(AVCRC) * 1024)
for (i = 0; i < 256; i++)
for (j = 0; j < 3; j++)
ctx[256 *(j + 1) + i] =
ctx[256 * (j + 1) + i] =
(ctx[256 * j + i] >> 8) ^ ctx[ctx[256 * j + i] & 0xFF];
#endif
@@ -383,13 +384,13 @@ int main(void)
{
uint8_t buf[1999];
int i;
unsigned
p[6][3] = { { AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04 },
{ AV_CRC_32_IEEE , 0x04C11DB7, 0xC0F5BAE0 },
{ AV_CRC_24_IEEE , 0x864CFB , 0xB704CE },
{ AV_CRC_16_ANSI_LE, 0xA001 , 0xBFD8 },
{ AV_CRC_16_ANSI , 0x8005 , 0x1FBB },
{ AV_CRC_8_ATM , 0x07 , 0xE3 }
unsigned p[6][3] = {
{ AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04 },
{ AV_CRC_32_IEEE , 0x04C11DB7, 0xC0F5BAE0 },
{ AV_CRC_24_IEEE , 0x864CFB , 0xB704CE },
{ AV_CRC_16_ANSI_LE, 0xA001 , 0xBFD8 },
{ AV_CRC_16_ANSI , 0x8005 , 0x1FBB },
{ AV_CRC_8_ATM , 0x07 , 0xE3 }
};
const AVCRC *ctx;