summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_alt_ref_aq.c
diff options
context:
space:
mode:
authorYury Gitman <yuryg@google.com>2016-07-18 15:44:40 -0700
committerYury Gitman <yuryg@google.com>2016-08-25 10:55:14 -0700
commit292d221fed21a84b3a9902bcaecda00cc08e6029 (patch)
treec824981a245faa906afcaef28898e25b7a0c4f40 /vp9/encoder/vp9_alt_ref_aq.c
parentc0180325793e7f1dcd50bf8a30dfe2ce41e6ae75 (diff)
downloadlibvpx-292d221fed21a84b3a9902bcaecda00cc08e6029.tar
libvpx-292d221fed21a84b3a9902bcaecda00cc08e6029.tar.gz
libvpx-292d221fed21a84b3a9902bcaecda00cc08e6029.tar.bz2
libvpx-292d221fed21a84b3a9902bcaecda00cc08e6029.zip
Create interface for the ALT_REF_AQ class
Current commit is just an API template for the rest of the code, and I will add inner logic later. Altref frames generate a lot of bitrate and at the same time other frames refer to them a lot, so it makes sense to apply special compensation-based adaptive quantization scheme for altref frames. E.g., for blocks that are good predictors for the future apply rate-control chosen quantizer while for bad predictors apply worse one. Change-Id: Iba3f8ec349470673b7249f6a125f6859336a47c8
Diffstat (limited to 'vp9/encoder/vp9_alt_ref_aq.c')
-rw-r--r--vp9/encoder/vp9_alt_ref_aq.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_alt_ref_aq.c b/vp9/encoder/vp9_alt_ref_aq.c
new file mode 100644
index 000000000..d7fbdc6f7
--- /dev/null
+++ b/vp9/encoder/vp9_alt_ref_aq.c
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file in the root of the source tree. An additional
+ * intellectual property rights grant can be found in the file PATENTS.
+ * All contributing project authors may be found in the AUTHORS file in
+ * the root of the source tree.
+ */
+
+#include "vp9/encoder/vp9_encoder.h"
+
+#include "vp9/encoder/vp9_alt_ref_aq_private.h"
+#include "vp9/encoder/vp9_alt_ref_aq.h"
+
+struct ALT_REF_AQ *vp9_alt_ref_aq_create() {
+ return (struct ALT_REF_AQ *)vpx_malloc(sizeof(struct ALT_REF_AQ));
+}
+
+void vp9_alt_ref_aq_destroy(struct ALT_REF_AQ *const self) { vpx_free(self); }
+
+void vp9_alt_ref_aq_upload_map(struct ALT_REF_AQ *const self,
+ const struct MATX_8U *segmentation_map) {
+ (void)self;
+ (void)segmentation_map;
+}
+
+void vp9_alt_ref_aq_set_nsegments(struct ALT_REF_AQ *const self,
+ int nsegments) {
+ (void)self;
+ (void)nsegments;
+}
+
+void vp9_alt_ref_aq_setup_mode(struct ALT_REF_AQ *const self,
+ struct VP9_COMP *const cpi) {
+ (void)cpi;
+ (void)self;
+}
+
+// set basic segmentation to the altref's one
+void vp9_alt_ref_aq_setup_map(struct ALT_REF_AQ *const self,
+ struct VP9_COMP *const cpi) {
+ (void)cpi;
+ (void)self;
+}
+
+// restore cpi->aq_mode
+void vp9_alt_ref_aq_unset_all(struct ALT_REF_AQ *const self,
+ struct VP9_COMP *const cpi) {
+ (void)cpi;
+ (void)self;
+}
+
+int vp9_alt_ref_aq_disable_if(const struct ALT_REF_AQ *self,
+ int segmentation_overhead, int bandwidth) {
+ (void)bandwidth;
+ (void)self;
+ (void)segmentation_overhead;
+
+ return 0;
+}