Commit Graph

10 Commits

Author SHA1 Message Date
Martin Storsjö
2356eb1ff6 Move the memory allocation/deallocation routines to the common library
They are still used slightly differently in the encoder and decoder;
the decoder uses plain functions while the encoder uses one object
keeping track of the number of allocated bytes, and keeping track
of the requested alignment.
2015-01-30 11:30:59 +02:00
Martin Storsjö
869870e670 Rename the decoder WelsMalloc to WelsMallocz
This function actually zero-initializes the allocated memory, thus
make this clear in the function name.

This makes the function name match the same behaviour in the encoder.
2015-01-30 10:37:48 +02:00
huili2
fd45e7ff15 EC UT fail bug fix 2014-11-10 17:56:26 -08:00
huili2
103fa5bbed enable cross IDR EC method 2014-11-03 22:11:49 -08:00
huili2
933c477717 modify EC API name and remove useless flag 2014-07-27 21:35:26 -07:00
huili2
fb6379eeb1 use grey instead of green in EC without ref 2014-07-07 02:24:51 -07:00
Martin Storsjö
d2afebd2d7 Add proper spacing in include directvies 2014-07-01 10:55:04 +03:00
Martin Storsjö
4f594deff9 Don't reset the random number generator within the unit tests
This makes sure we don't accidentally return the same sequence
of random numbers multiple times within one test (which would
be very non-random).

Every time srand(time()) is called, the pseudo random number
generator is initialized to the same value (as long as time()
returned the same value).

By initializing the random number generator once and for all
before starting to run the unit tests, we are sure we don't
need to reinitialize it within all the tests and all the
functions that use random numbers.

This fixes occasional errors in MotionEstimateTest.

MotionEstimateTest was designed to allow the test to occasionally
not succeed - if it didn't succeed, it tried again, up to 100 times.
However, since the YUVPixelDataGenerator function reset the random
seed to time(), every attempt actually ran with the same random
data (as long as all 100 attempts ran within 1 second) - thus if
one attempt in MotionEstimateTest failed, all 100 of them would
fail. If the utility functions don't touch the random seed,
this is not an issue.
2014-07-01 10:20:45 +03:00
huili2
7772a9dc31 bug fix of EC_copy 2014-04-28 20:34:00 -07:00
huili2
4a6259cf74 add slice/frame copy UT for EC 2014-04-23 21:45:17 -07:00