Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
committertetsuo55 <tetsuo55@users.sourceforge.net>2010-04-09 01:14:58 +0400
commita9b7bf3fb3e1334d8defd05ca4cfae870b4912e5 (patch)
tree2dab453d94d5e003379a6cc895eceb84c80e23ec /src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlp.c
parentaafd49a91f7c2fa9c7103971c16fa6e1b29e8bfd (diff)
astyle formatting cleanup to make the sourcecode more accessible
switch used: astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren http://astyle.sourceforge.net/ git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1783 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlp.c')
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlp.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlp.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlp.c
index 87f7c7713..db506853e 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlp.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/mlp.c
@@ -25,7 +25,8 @@
#include "libavutil/intreadwrite.h"
#include "mlp.h"
-const uint8_t ff_mlp_huffman_tables[3][18][2] = {
+const uint8_t ff_mlp_huffman_tables[3][18][2] =
+{
{ /* Huffman table 0, -7 - +10 */
{0x01, 9}, {0x01, 8}, {0x01, 7}, {0x01, 6}, {0x01, 5}, {0x01, 4}, {0x01, 3},
{0x04, 3}, {0x05, 3}, {0x06, 3}, {0x07, 3},
@@ -53,7 +54,8 @@ static AVCRC crc_2D[CRC_TABLE_SIZE];
av_cold void ff_mlp_init_crc(void)
{
- if (!crc_init) {
+ if(!crc_init)
+ {
av_crc_init(crc_63, 0, 8, 0x63, sizeof(crc_63));
av_crc_init(crc_1D, 0, 8, 0x1D, sizeof(crc_1D));
av_crc_init(crc_2D, 0, 16, 0x002D, sizeof(crc_2D));
@@ -86,9 +88,10 @@ uint8_t ff_mlp_restart_checksum(const uint8_t *buf, unsigned int bit_size)
crc = av_crc(crc_1D, crc, buf + 1, num_bytes - 2);
crc ^= buf[num_bytes - 1];
- for (i = 0; i < ((bit_size + 2) & 7); i++) {
+ for(i = 0; i < ((bit_size + 2) & 7); i++)
+ {
crc <<= 1;
- if (crc & 0x100)
+ if(crc & 0x100)
crc ^= 0x11D;
crc ^= (buf[num_bytes] >> (7 - i)) & 1;
}
@@ -101,14 +104,14 @@ uint8_t ff_mlp_calculate_parity(const uint8_t *buf, unsigned int buf_size)
uint32_t scratch = 0;
const uint8_t *buf_end = buf + buf_size;
- for (; ((intptr_t) buf & 3) && buf < buf_end; buf++)
+ for(; ((intptr_t) buf & 3) && buf < buf_end; buf++)
scratch ^= *buf;
- for (; buf < buf_end - 3; buf += 4)
+ for(; buf < buf_end - 3; buf += 4)
scratch ^= *((const uint32_t*)buf);
scratch = xor_32_to_8(scratch);
- for (; buf < buf_end; buf++)
+ for(; buf < buf_end; buf++)
scratch ^= *buf;
return scratch;