#include <cassert>
#include <climits>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <initializer_list>
#include <vector>
#include "gtest/gtest.h"
#include "test/acm_random.h"
#include "test/video_source.h"
#include "test/y4m_video_source.h"
#include "./vpx_config.h"
#include "vpx/vp8cx.h"
#include "vpx/vpx_codec.h"
#include "vpx/vpx_encoder.h"
#include "vpx/vpx_image.h"
namespace {
vpx_codec_iface_t *kCodecIfaces[] = …;
bool IsVP9(vpx_codec_iface_t *iface) { … }
void *Memset16(void *dest, int val, size_t length) { … }
vpx_image_t *CreateImage(vpx_bit_depth_t bit_depth, vpx_img_fmt_t fmt,
unsigned int width, unsigned int height) { … }
void InitCodec(vpx_codec_iface_t &iface, int width, int height,
vpx_codec_ctx_t *enc, vpx_codec_enc_cfg_t *cfg) { … }
void EncodeWithConfig(const vpx_codec_enc_cfg_t &cfg, vpx_codec_ctx_t *enc) { … }
TEST(EncodeAPI, InvalidParams) { … }
TEST(EncodeAPI, HighBitDepthCapability) { … }
#if CONFIG_VP8_ENCODER
TEST(EncodeAPI, ImageSizeSetting) { … }
TEST(EncodeAPI, HugeFramerateVp8) { … }
TEST(EncodeAPI, RandomPixelsVp8) { … }
TEST(EncodeAPI, ChangeToL1T3AndSetBitrateVp8) { … }
class VP8Encoder { … };
VP8Encoder::~VP8Encoder() { … }
void VP8Encoder::Configure(unsigned int threads, unsigned int width,
unsigned int height, vpx_rc_mode end_usage,
vpx_enc_deadline_t deadline) { … }
void VP8Encoder::Encode(bool key_frame) { … }
TEST(EncodeAPI, Chromium324459561) { … }
TEST(EncodeAPI, VP8GlobalHeaders) { … }
TEST(EncodeAPI, AomediaIssue3509VbrMinSection2PercentVP8) { … }
TEST(EncodeAPI, AomediaIssue3509VbrMinSection101PercentVP8) { … }
TEST(EncodeAPI, OssFuzz69100) { … }
void EncodeOssFuzz69906(int cpu_used, vpx_enc_deadline_t deadline) { … }
TEST(EncodeAPI, OssFuzz69906) { … }
#endif
TEST(EncodeAPI, MultiResEncode) { … }
TEST(EncodeAPI, SetRoi) { … }
TEST(EncodeAPI, ConfigChangeThreadCount) { … }
TEST(EncodeAPI, ConfigResizeChangeThreadCount) { … }
TEST(EncodeAPI, ConfigResizeBiggerAfterInit) { … }
TEST(EncodeAPI, ConfigResizeBiggerAfterEncode) { … }
TEST(EncodeAPI, PtsSmallerThanInitialPts) { … }
TEST(EncodeAPI, PtsOrDurationTooBig) { … }
#if CONFIG_VP9_ENCODER
#if VPX_ARCH_X86_64 || VPX_ARCH_AARCH64
TEST(EncodeAPI, ConfigLargeTargetBitrateVp9) { … }
#endif
class VP9Encoder { … };
VP9Encoder::~VP9Encoder() { … }
void VP9Encoder::Configure(unsigned int threads, unsigned int width,
unsigned int height, vpx_rc_mode end_usage,
vpx_enc_deadline_t deadline) { … }
void VP9Encoder::Encode(bool key_frame) { … }
TEST(EncodeAPI, PrevMiCheckNullptr) { … }
TEST(EncodeAPI, MultipleChangeConfigResize) { … }
TEST(EncodeAPI, DynamicDeadlineChange) { … }
TEST(EncodeAPI, Buganizer310340241) { … }
TEST(EncodeAPI, Buganizer312517065) { … }
TEST(EncodeAPI, Buganizer311489136) { … }
TEST(EncodeAPI, Buganizer312656387) { … }
TEST(EncodeAPI, Buganizer310329177) { … }
TEST(EncodeAPI, Buganizer311394513) { … }
TEST(EncodeAPI, Buganizer311985118) { … }
TEST(EncodeAPI, Buganizer314857577) { … }
TEST(EncodeAPI, Buganizer312875957PredBufferStride) { … }
TEST(EncodeAPI, Buganizer311294795) { … }
TEST(EncodeAPI, Buganizer317105128) { … }
TEST(EncodeAPI, Buganizer319964497) { … }
TEST(EncodeAPI, Buganizer329088759RowMT0) { … }
TEST(EncodeAPI, Buganizer329088759RowMT1) { … }
TEST(EncodeAPI, Buganizer331086799) { … }
TEST(EncodeAPI, Buganizer331108729) { … }
TEST(EncodeAPI, Buganizer331108922BitDepth8) { … }
#if CONFIG_VP9_HIGHBITDEPTH
TEST(EncodeAPI, Buganizer329674887RowMT0BitDepth12) { … }
TEST(EncodeAPI, Buganizer329179808RowMT0BitDepth10) { … }
TEST(EncodeAPI, Buganizer329179808RowMT1BitDepth10) { … }
TEST(EncodeAPI, Buganizer331108922BitDepth12) { … }
#endif
TEST(EncodeAPI, VP9GlobalHeaders) { … }
TEST(EncodeAPI, AomediaIssue3509VbrMinSection2PercentVP9) { … }
TEST(EncodeAPI, AomediaIssue3509VbrMinSection101PercentVP9) { … }
TEST(EncodeAPI, Chromium352414650) { … }
#endif
}