diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-21 16:40:10 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-21 16:50:06 +0100 |
commit | 5f587b1daf90a8c0bf4f2eb5c13b4022252ec498 (patch) | |
tree | 35a70d34f85854c68facfbdfffefc962ca66f1e5 /libavutil/crc.c | |
parent | 32c044cbc64034a9688e3711efe5251998d767b1 (diff) | |
parent | 3b08d9d932eef09403074d5af31e10d8011e840b (diff) | |
download | ffmpeg-5f587b1daf90a8c0bf4f2eb5c13b4022252ec498.tar.gz |
Merge commit '3b08d9d932eef09403074d5af31e10d8011e840b'
* commit '3b08d9d932eef09403074d5af31e10d8011e840b':
testprogs: K&R formatting cosmetics
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/crc.c')
-rw-r--r-- | libavutil/crc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libavutil/crc.c b/libavutil/crc.c index 5a1ddf092b..8d9cb326bc 100644 --- a/libavutil/crc.c +++ b/libavutil/crc.c @@ -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; |