File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5353 fprintf(stderr, "\033[0m"); \
5454 } while (0)
5555
56+ #ifndef ALIGN_BACK
57+ #define ALIGN_BACK (x , a ) (((x) / (a)) * (a))
58+ #endif
59+ #ifndef ALIGN_UP
60+ #define ALIGN_UP (x , a ) ((((x) + ((a)-1)) / a) * a)
61+ #endif
5662#ifndef CEILING
5763#define CEILING_POS (x ) ((x - (int)(x)) > 0 ? (int)(x + 1) : (int)(x))
5864#define CEILING_NEG (x ) (int)(x)
5965#define CEILING (x ) (((x) > 0) ? CEILING_POS(x) : CEILING_NEG(x))
6066#endif
61-
67+ #ifndef CEILING_2_POWER
68+ #define CEILING_2_POWER (x , a ) (((x) + ((a)-1)) & (~((a) - 1)))
69+ #endif
6270#ifndef MIN
6371#define MIN (a , b ) (((a) < (b)) ? (a) : (b))
6472#endif
65-
6673#ifndef MAX
6774#define MAX (a , b ) (((a) > (b)) ? (a) : (b))
6875#endif
7380 ((strlen(a) > strlen(b)) && !strcmp(a + strlen(a) - strlen(b), b))
7481#define EQUALS (a , b ) !strcmp(a, b)
7582#define EQUALS_CASE (a , b ) !strcasecmp(a, b)
76- #define STARTS_WITH (a , b ) !strncmp(a, b, strlen(b))
83+ #define STARTS_WITH (a , b ) !strncmp(a, b, strlen(b))
Original file line number Diff line number Diff line change 66#include "ak_venc.h"
77#include "ak_vi.h"
88
9+ #include "../support.h"
10+
911extern char audioOn , keepRunning ;
1012
1113extern hal_chnstate ak_state [AK_VENC_CHN_NUM ];
@@ -36,4 +38,4 @@ int ak_video_snapshot_grab(char index, hal_jpegdata *jpeg);
3638void * ak_video_thread (void );
3739
3840void ak_system_deinit (void );
39- int ak_system_init (char * snrConfig );
41+ int ak_system_init (char * snrConfig );
Original file line number Diff line number Diff line change 22
33#include "macros.h"
44
5- #ifndef ALIGN_BACK
6- #define ALIGN_BACK (x , a ) (((x) / (a)) * (a))
7- #endif
8- #ifndef ALIGN_UP
9- #define ALIGN_UP (x , a ) ((((x) + ((a)-1)) / a) * a)
10- #endif
11- #ifndef CEILING_2_POWER
12- #define CEILING_2_POWER (x , a ) (((x) + ((a)-1)) & (~((a) - 1)))
13- #endif
14- #ifndef MIN
15- #define MIN (a , b ) (((a) < (b)) ? (a) : (b))
16- #endif
17- #ifndef MAX
18- #define MAX (a , b ) (((a) > (b)) ? (a) : (b))
19- #endif
20-
215typedef enum {
226 HAL_PLATFORM_UNK ,
237 HAL_PLATFORM_AK ,
@@ -133,4 +117,4 @@ typedef struct {
133117 hal_vidpack * pack ;
134118 unsigned int count ;
135119 unsigned int seq ;
136- } hal_vidstream ;
120+ } hal_vidstream ;
You can’t perform that action at this time.
0 commit comments