Skip to content
This repository was archived by the owner on May 18, 2023. It is now read-only.

Commit aba8218

Browse files
clang-format the project
1 parent d4636a2 commit aba8218

File tree

9 files changed

+2891
-2526
lines changed

9 files changed

+2891
-2526
lines changed

.clang-format

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
BasedOnStyle: LLVM
2+
UseTab: Never
3+
IndentWidth: 4
4+
TabWidth: 4
5+
BreakBeforeBraces: Allman
6+
ColumnLimit: 0
7+
AccessModifierOffset: -4
8+
PointerAlignment: Left
9+
IndentCaseLabels: true
10+
AllowShortIfStatementsOnASingleLine: true

image_def.h

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* * Neither the name of the copyright holder nor the
1313
* names of its contributors may be used to endorse or promote products
1414
* derived from this software without specific prior written permission.
15-
*
15+
*
1616
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1717
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1818
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -30,39 +30,45 @@
3030

3131
#include <stdint.h>
3232

33-
#define destroyImage(im) {free((im)->pData); (im)->pData = NULL;}
33+
#define destroyImage(im) \
34+
{ \
35+
free((im)->pData); \
36+
(im)->pData = NULL; \
37+
}
3438

3539
/* Color spaces OMX-Components support */
3640
#define COLOR_SPACE_RGB24 0
3741
#define COLOR_SPACE_RGBA 1
3842
#define COLOR_SPACE_YUV420P 2
3943
#define COLOR_SPACE_RGB16 3
4044

41-
typedef struct IMAGE{
42-
uint8_t* pData; /* Image pixel data */
43-
size_t nData; /* Alloc data length */
44-
45-
unsigned int width;
46-
unsigned int height;
47-
unsigned char colorSpace;
45+
typedef struct IMAGE
46+
{
47+
uint8_t* pData; /* Image pixel data */
48+
size_t nData; /* Alloc data length */
49+
50+
unsigned int width;
51+
unsigned int height;
52+
unsigned char colorSpace;
4853
} IMAGE;
4954

50-
typedef struct ANIM_IMAGE{
51-
IMAGE *curFrame;
52-
IMAGE *frames;
53-
unsigned int decodeCount;
54-
unsigned int frameNum;
55-
56-
uint8_t* imData;
57-
size_t size;
58-
59-
void* pExtraData;
60-
int (*decodeNextFrame)(struct ANIM_IMAGE *);
61-
void (*finaliseDecoding)(struct ANIM_IMAGE *);
62-
63-
unsigned int frameCount;
64-
unsigned int frameDelayCs;
65-
int loopCount;
55+
typedef struct ANIM_IMAGE
56+
{
57+
IMAGE* curFrame;
58+
IMAGE* frames;
59+
unsigned int decodeCount;
60+
unsigned int frameNum;
61+
62+
uint8_t* imData;
63+
size_t size;
64+
65+
void* pExtraData;
66+
int (*decodeNextFrame)(struct ANIM_IMAGE*);
67+
void (*finaliseDecoding)(struct ANIM_IMAGE*);
68+
69+
unsigned int frameCount;
70+
unsigned int frameDelayCs;
71+
int loopCount;
6672

6773
} ANIM_IMAGE;
6874

0 commit comments

Comments
 (0)