Skip to content

Commit ced2c29

Browse files
authored
Merge pull request #73 from mpeg5/dev-XeveParamParse
Extended public API
2 parents 213afa7 + 9137378 commit ced2c29

File tree

4 files changed

+394
-1
lines changed

4 files changed

+394
-1
lines changed

inc/xeve.h

+1
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ int XEVE_EXPORT xeve_config(XEVE id, int cfg, void * buf, int * size);
593593
int XEVE_EXPORT xeve_param_default(XEVE_PARAM* param);
594594
int XEVE_EXPORT xeve_param_ppt(XEVE_PARAM* param, int profile, int preset, int tune);
595595
int XEVE_EXPORT xeve_param_check(const XEVE_PARAM* param);
596+
int XEVE_EXPORT xeve_param_parse(XEVE_PARAM * param, const char * name, const char * value);
596597

597598
#ifdef __cplusplus
598599
} /* extern "C" */

src_base/xeve.c

+14-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
#include <math.h>
3232
#include "xeve_type.h"
33+
#include "xeve_param_parse.h"
3334

3435
XEVE xeve_create(XEVE_CDSC * cdsc, int * err)
3536
{
@@ -329,7 +330,7 @@ int xeve_param_check(const XEVE_PARAM* param)
329330
int ret = 0;
330331
int min_block_size = 4;
331332

332-
// Param check done to avoid main profile toolset inside baseline profile
333+
// Param check done to avoid main profile toolset inside baseline profile
333334
if (param->tool_amvr == 1) { xeve_trace("AMVR cannot be on in base profile\n"); ret = -1; }
334335
if (param->tool_mmvd == 1) { xeve_trace("MMVD cannot be on in base profile\n"); ret = -1; }
335336
if (param->tool_affine == 1) { xeve_trace("Affine cannot be on in base profile\n"); ret = -1; }
@@ -359,3 +360,15 @@ int xeve_param_check(const XEVE_PARAM* param)
359360

360361
return ret;
361362
}
363+
364+
int XEVE_EXPORT xeve_param_parse(XEVE_PARAM* param, const char* name, const char* value)
365+
{
366+
if (!param || !name || !value)
367+
{
368+
return XEVE_ERR_INVALID_ARGUMENT;
369+
}
370+
371+
int ret = xeve_param_set_val(param, name, value);
372+
return ret;
373+
}
374+

0 commit comments

Comments
 (0)