Commit 5aab1a61 authored by Andreas Schmidt's avatar Andreas Schmidt

Fix failing tests due to disabled coding.

parent 04538e7e
Pipeline #818 passed with stages
in 57 seconds
......@@ -9,9 +9,8 @@ PrrtCodingParams *PrrtCodingParams_create(void)
check_mem(cpar);
pthread_mutex_init(&cpar->lock, NULL);
cpar->k = K_START;
cpar->n = N_START;
cpar->r = cpar->n - cpar->k;
PrrtCodingParams_update(cpar, K_START, N_START);
cpar->n_p = N_P_START;
return cpar;
......@@ -20,6 +19,13 @@ PrrtCodingParams *PrrtCodingParams_create(void)
return NULL;
}
bool PrrtCodingParams_update(PrrtCodingParams *cpar, uint8_t k, uint8_t n) {
cpar->k = k;
cpar->n = n;
cpar->r = cpar->n - cpar->k;
return true;
}
bool PrrtCodingParams_destroy(PrrtCodingParams * cpar) {
pthread_mutex_destroy(&cpar->lock);
free(cpar);
......
......@@ -15,6 +15,7 @@ typedef struct prrtCodingParams {
} PrrtCodingParams;
PrrtCodingParams * PrrtCodingParams_create(void);
bool PrrtCodingParams_update(PrrtCodingParams * cpar, uint8_t k, uint8_t n);
bool PrrtCodingParams_destroy(PrrtCodingParams * cpar);
#endif //PRRT_CODING_PARAMS_H
......@@ -15,6 +15,7 @@ protected:
virtual void SetUp()
{
PrrtCodingParams *cpar = PrrtCodingParams_create();
PrrtCodingParams_update(cpar, 4, 7);
encBlock = PrrtBlock_create(cpar, 1);
decBlock = PrrtBlock_create(cpar, 1);
PrrtCodingParams_destroy(cpar);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment