Skip to content

Commit 7254eeb

Browse files
committed
removed unused code
Signed-off-by: [email protected] <[email protected]>
1 parent e3114e9 commit 7254eeb

File tree

3 files changed

+5
-74
lines changed

3 files changed

+5
-74
lines changed

app/oapv_app_enc.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ static args_var_t *args_init_vars(args_parser_t *args, oapve_param_t *param)
407407
args_set_variable_by_key_long(opts, "master-display", vars->master_display);
408408
args_set_variable_by_key_long(opts, "max-cll", vars->max_cll);
409409

410-
411410
return vars;
412411
}
413412

@@ -765,7 +764,6 @@ static int update_param(args_var_t *vars, oapve_param_t *param)
765764

766765
UPDATE_A_PARAM_W_KEY_VAL(param, "tile-w", vars->tile_w);
767766
UPDATE_A_PARAM_W_KEY_VAL(param, "tile-h", vars->tile_h);
768-
769767
return 0;
770768
}
771769

@@ -796,7 +794,7 @@ static int parse_max_cll(const char* data_string, oapvm_payload_cll_t *cll)
796794
&cll->max_cll, &cll->max_fall
797795
);
798796

799-
// Check if sscanf successfully assigned all expected fields (10 numerical values).
797+
// Check if sscanf successfully assigned all expected fields (2 numerical values).
800798
const int expected_fields = 2;
801799
if (assigned_fields != expected_fields) {
802800
logerr("ERR: parsing error: content light level information");
@@ -805,7 +803,7 @@ static int parse_max_cll(const char* data_string, oapvm_payload_cll_t *cll)
805803
return 0; // Success
806804
}
807805

808-
static int ready_for_metadata(args_var_t *vars, oapvm_t mid)
806+
static int update_metadata(args_var_t *vars, oapvm_t mid)
809807
{
810808
int ret, size;
811809
oapvm_payload_mdcv_t mdcv;
@@ -817,7 +815,7 @@ static int ready_for_metadata(args_var_t *vars, oapvm_t mid)
817815
is_cll = (strlen(vars->max_cll) > 0)? 1: 0;
818816

819817
if(!is_mdcv && !is_cll) {
820-
// no need to ready metadata handler
818+
// no need to add metadata payload
821819
return 0;
822820
}
823821

@@ -1144,8 +1142,8 @@ int main(int argc, const char **argv)
11441142
}
11451143

11461144
/* ready metadata if needs */
1147-
if(ready_for_metadata(args_var, mid)) {
1148-
logerr("ERR: failed to ready metadata handler");
1145+
if(update_metadata(args_var, mid)) {
1146+
logerr("ERR: failed to update metadata");
11491147
ret = -1;
11501148
goto ERR;
11511149
}

app/oapv_app_util.h

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#include <math.h>
4545
#include <stdarg.h>
4646
#include <ctype.h>
47-
#include <stdint.h>
4847
#if LINUX
4948
#include <signal.h>
5049
#include <unistd.h>
@@ -182,71 +181,6 @@ static void log_line(char *pre)
182181

183182
static int op_verbose = VERBOSE_SIMPLE;
184183

185-
/* Endiannes */
186-
#define BSWAP16(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff))
187-
#define BSWAP32(x) (BSWAP16(x) << 16 | BSWAP16((x) >> 16))
188-
#define BSWAP64(x) (BSWAP32(x) << 32 | BSWAP32((x) >> 32))
189-
190-
#ifndef bswap16
191-
static inline uint16_t bswap16(uint16_t x)
192-
{
193-
x= (x>>8) | (x<<8);
194-
return x;
195-
}
196-
#endif
197-
198-
#ifndef bswap32
199-
static inline uint32_t bswap32(uint32_t x)
200-
{
201-
return BSWAP32(x);
202-
}
203-
#endif
204-
205-
#ifndef bswap64
206-
static inline uint64_t bswap64(uint64_t x)
207-
{
208-
return (uint64_t)bswap32(x) << 32 | bswap32(x >> 32);
209-
}
210-
#endif
211-
212-
// be2ne - big-endian to native-endian
213-
// le2ne - little-endian to native-endian
214-
// ne2be - native-endian to big-endian
215-
// ne2le - native-endian to little-endian
216-
217-
#if HAVE_BIGENDIAN
218-
#define be2ne16(x) (x)
219-
#define be2ne32(x) (x)
220-
#define be2ne64(x) (x)
221-
#define le2ne16(x) bswap16(x)
222-
#define le2ne32(x) bswap32(x)
223-
#define le2ne64(x) bswap64(x)
224-
225-
#define ne2be16(x) (x)
226-
#define ne2be32(x) (x)
227-
#define ne2be64(x) (x)
228-
#define ne2le16(x) bswap16(x)
229-
#define ne2le32(x) bswap32(x)
230-
#define ne2le64(x) bswap64(x)
231-
232-
#else
233-
234-
#define be2ne16(x) bswap16(x)
235-
#define be2ne32(x) bswap32(x)
236-
#define be2ne64(x) bswap64(x)
237-
#define le2ne16(x) (x)
238-
#define le2ne32(x) (x)
239-
#define le2ne64(x) (x)
240-
241-
#define ne2be16(x) bswap16(x)
242-
#define ne2be32(x) bswap32(x)
243-
#define ne2be64(x) bswap64(x)
244-
#define ne2le16(x) (x)
245-
#define ne2le32(x) (x)
246-
#define ne2le64(x) (x)
247-
248-
#endif
249-
250184
/* Clocks */
251185
#if defined(_WIN64) || defined(_WIN32)
252186
#include <windows.h>

src/oapv_param.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ int oapve_param_default(oapve_param_t *param)
6262
param->transfer_characteristics = 2; // unspecified transfer characteristics
6363
param->matrix_coefficients = 2; // unspecified matrix coefficients
6464
param->full_range_flag = 0; // limited range
65-
6665
return OAPV_OK;
6766
}
6867

0 commit comments

Comments
 (0)