mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-18 07:18:34 +00:00
[libvpx] Update to v1.17.0-97-gd3335af9e
This commit is contained in:
1 parent
7481baed18
commit
a55111af58
615 files changed
+68654
-28912
No files matched your search
@@ -12,7 +12,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "test/acm_random.h"
|
||||
#include "vpx/vpx_integer.h"
|
||||
@@ -53,7 +53,7 @@ TEST(VP9, TestBitIO) {
|
||||
ACMRandom bit_rnd(random_seed);
|
||||
vpx_writer bw;
|
||||
uint8_t bw_buffer[kBufferSize];
|
||||
vpx_start_encode(&bw, bw_buffer);
|
||||
vpx_start_encode(&bw, bw_buffer, sizeof(bw_buffer));
|
||||
|
||||
int bit = (bit_method == 0) ? 0 : (bit_method == 1) ? 1 : 0;
|
||||
for (int i = 0; i < kBitsToTest; ++i) {
|
||||
@@ -65,7 +65,7 @@ TEST(VP9, TestBitIO) {
|
||||
vpx_write(&bw, bit, static_cast<int>(probas[i]));
|
||||
}
|
||||
|
||||
vpx_stop_encode(&bw);
|
||||
GTEST_ASSERT_EQ(vpx_stop_encode(&bw), 0);
|
||||
// vpx_reader_fill() may read into uninitialized data that
|
||||
// isn't used meaningfully, but may trigger an MSan warning.
|
||||
memset(bw_buffer + bw.pos, 0, sizeof(BD_VALUE) - 1);
|
||||
@@ -90,3 +90,24 @@ TEST(VP9, TestBitIO) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST(VP9, TestBitIOBufferSize0) {
|
||||
vpx_writer bw;
|
||||
uint8_t bw_buffer[1];
|
||||
vpx_start_encode(&bw, bw_buffer, 0);
|
||||
GTEST_ASSERT_EQ(vpx_stop_encode(&bw), -1);
|
||||
}
|
||||
|
||||
TEST(VP9, TestBitIOBufferSize1) {
|
||||
vpx_writer bw;
|
||||
uint8_t bw_buffer[1];
|
||||
vpx_start_encode(&bw, bw_buffer, sizeof(bw_buffer));
|
||||
GTEST_ASSERT_EQ(vpx_stop_encode(&bw), -1);
|
||||
}
|
||||
|
||||
TEST(VP9, TestBitIOBufferSize2) {
|
||||
vpx_writer bw;
|
||||
uint8_t bw_buffer[2];
|
||||
vpx_start_encode(&bw, bw_buffer, sizeof(bw_buffer));
|
||||
GTEST_ASSERT_EQ(vpx_stop_encode(&bw), 0);
|
||||
}
|
||||
Reference in new issue
Block a user