From 845ee8ca99a306fe0124d725a5d8738ff69cb411 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Thu, 11 Feb 2016 17:33:26 -0800 Subject: [PATCH] change encode function name --- include/rfxcodec_encode.h | 8 +++++++- src/rfxencode.c | 24 +++++++++++++++++++----- tests/rfxcodectest.c | 12 ++++++------ 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/include/rfxcodec_encode.h b/include/rfxcodec_encode.h index e41d933..04112b0 100644 --- a/include/rfxcodec_encode.h +++ b/include/rfxcodec_encode.h @@ -65,6 +65,12 @@ rfxcodec_encode(void *handle, char *cdata, int *cdata_bytes, char *buf, int width, int height, int stride_bytes, const struct rfx_rect *region, int num_region, const struct rfx_tile *tiles, int num_tiles, - const char *quants, int num_quants, int flags); + const char *quants, int num_quants); +int +rfxcodec_encode_ex(void *handle, char *cdata, int *cdata_bytes, + char *buf, int width, int height, int stride_bytes, + const struct rfx_rect *region, int num_region, + const struct rfx_tile *tiles, int num_tiles, + const char *quants, int num_quants, int flags); #endif diff --git a/src/rfxencode.c b/src/rfxencode.c index 94c5d62..9bbf103 100644 --- a/src/rfxencode.c +++ b/src/rfxencode.c @@ -294,11 +294,11 @@ rfxcodec_encode_destroy(void * handle) /******************************************************************************/ int -rfxcodec_encode(void *handle, char *cdata, int *cdata_bytes, - char *buf, int width, int height, int stride_bytes, - const struct rfx_rect *regions, int num_regions, - const struct rfx_tile *tiles, int num_tiles, - const char *quants, int num_quants, int flags) +rfxcodec_encode_ex(void *handle, char *cdata, int *cdata_bytes, + char *buf, int width, int height, int stride_bytes, + const struct rfx_rect *regions, int num_regions, + const struct rfx_tile *tiles, int num_tiles, + const char *quants, int num_quants, int flags) { struct rfxencode *enc; STREAM s; @@ -327,3 +327,17 @@ rfxcodec_encode(void *handle, char *cdata, int *cdata_bytes, *cdata_bytes = (int) (s.p - s.data); return 0; } + +/******************************************************************************/ +int +rfxcodec_encode(void *handle, char *cdata, int *cdata_bytes, + char *buf, int width, int height, int stride_bytes, + const struct rfx_rect *regions, int num_regions, + const struct rfx_tile *tiles, int num_tiles, + const char *quants, int num_quants) +{ + return rfxcodec_encode_ex(handle, cdata, cdata_bytes, buf, width, height, + stride_bytes, regions, num_regions, tiles, + num_tiles, quants, num_quants, 0); +} + diff --git a/tests/rfxcodectest.c b/tests/rfxcodectest.c index e1f2603..6733db8 100644 --- a/tests/rfxcodectest.c +++ b/tests/rfxcodectest.c @@ -118,9 +118,9 @@ speed_random(int count, const char *quants) //flags = RFX_FLAGS_ALPHAV1; for (index = 0; index < count; index++) { - error = rfxcodec_encode(han, cdata, &cdata_bytes, buf, 64, 64, 64 * 4, - regions, num_regions, tiles, num_tiles, - quants, num_quants, flags); + error = rfxcodec_encode_ex(han, cdata, &cdata_bytes, buf, 64, 64, 64 * 4, + regions, num_regions, tiles, num_tiles, + quants, num_quants, flags); if (error != 0) { break; @@ -288,9 +288,9 @@ encode_file(char *data, int width, int height, char *cdata, int *cdata_bytes, regions[0].cy = height; num_regions = 1; - error = rfxcodec_encode(han, cdata, cdata_bytes, data, width, height, width * 4, - regions, num_regions, tiles, num_tiles, - quants, num_quants, 0); + error = rfxcodec_encode_ex(han, cdata, cdata_bytes, data, width, height, width * 4, + regions, num_regions, tiles, num_tiles, + quants, num_quants, 0); if (error != 0) { printf("encode_file: rfxcodec_encode failed error %d\n", error);