aboutsummaryrefslogtreecommitdiff
path: root/vpx/internal
diff options
context:
space:
mode:
Diffstat (limited to 'vpx/internal')
-rw-r--r--vpx/internal/vpx_codec_internal.h23
-rw-r--r--vpx/internal/vpx_ratectrl_rtc.h12
2 files changed, 35 insertions, 0 deletions
diff --git a/vpx/internal/vpx_codec_internal.h b/vpx/internal/vpx_codec_internal.h
index 670fe380e..aae321873 100644
--- a/vpx/internal/vpx_codec_internal.h
+++ b/vpx/internal/vpx_codec_internal.h
@@ -48,6 +48,8 @@
#include "../vpx_encoder.h"
#include <stdarg.h>
+#include "vpx_config.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -427,6 +429,27 @@ struct vpx_internal_error_info {
jmp_buf jmp;
};
+#if CONFIG_DEBUG
+#define CHECK_MEM_ERROR(error, lval, expr) \
+ do { \
+ assert((error)->setjmp); \
+ (lval) = (expr); \
+ if (!(lval)) \
+ vpx_internal_error(error, VPX_CODEC_MEM_ERROR, \
+ "Failed to allocate " #lval " at %s:%d", __FILE__, \
+ __LINE__); \
+ } while (0)
+#else
+#define CHECK_MEM_ERROR(error, lval, expr) \
+ do { \
+ assert((error)->setjmp); \
+ (lval) = (expr); \
+ if (!(lval)) \
+ vpx_internal_error(error, VPX_CODEC_MEM_ERROR, \
+ "Failed to allocate " #lval); \
+ } while (0)
+#endif
+
#define CLANG_ANALYZER_NORETURN
#if defined(__has_feature)
#if __has_feature(attribute_analyzer_noreturn)
diff --git a/vpx/internal/vpx_ratectrl_rtc.h b/vpx/internal/vpx_ratectrl_rtc.h
index 65398c654..01d64b14b 100644
--- a/vpx/internal/vpx_ratectrl_rtc.h
+++ b/vpx/internal/vpx_ratectrl_rtc.h
@@ -14,6 +14,14 @@
#include "vpx/vpx_encoder.h"
namespace libvpx {
+
+enum class RcFrameType { kKeyFrame = 0, kInterFrame = 1 };
+
+enum class FrameDropDecision {
+ kOk, // Frame is encoded.
+ kDrop, // Frame is dropped.
+};
+
struct VpxRateControlRtcConfig {
public:
VpxRateControlRtcConfig() {
@@ -34,6 +42,8 @@ struct VpxRateControlRtcConfig {
aq_mode = 0;
layer_target_bitrate[0] = static_cast<int>(target_bandwidth);
ts_rate_decimator[0] = 1;
+ frame_drop_thresh = 0;
+ is_screen = false;
}
int width;
@@ -57,6 +67,8 @@ struct VpxRateControlRtcConfig {
// vbr, cbr
enum vpx_rc_mode rc_mode;
int aq_mode;
+ int frame_drop_thresh;
+ bool is_screen;
};
} // namespace libvpx
#endif // VPX_VPX_INTERNAL_VPX_RATECTRL_RTC_H_