summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2013-06-07 12:29:15 +0100
committerPaul Wilkins <paulwilkins@google.com>2013-06-07 12:31:54 +0100
commit653a25569ba09db521b3c6f26347fae000c7ae9b (patch)
tree722367c4aef222a13c6ca1c4aba5cb36351bc3e5 /vp9
parent4df9e7883c0ffb752715c87931baf58b7caee76c (diff)
downloadlibvpx-653a25569ba09db521b3c6f26347fae000c7ae9b.tar
libvpx-653a25569ba09db521b3c6f26347fae000c7ae9b.tar.gz
libvpx-653a25569ba09db521b3c6f26347fae000c7ae9b.tar.bz2
libvpx-653a25569ba09db521b3c6f26347fae000c7ae9b.zip
Compound inter encoder bug fix.
In the longer term the encoder should allow compound as long as one of the buffers has opposite sign bias and as per the decoder this buffer is then set as the fixed reference. However at the moment the encoder and RD loop only supports the case where the ALTREF_FRAME buffer (or third of the 3 allowed in any given frame) is the odd one out. This patch fixes a bug that would allow compound inter and set fixed ref to ALTREF_FRAME when it is not the odd one out. Change-Id: Ic83a69486e088a147ba83a4aedc2a0042f6b3721
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encodeframe.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index ea86bba4f..9a4b7a2d7 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1752,10 +1752,16 @@ static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) {
void vp9_encode_frame(VP9_COMP *cpi) {
VP9_COMMON *const cm = &cpi->common;
- if (cm->ref_frame_sign_bias[LAST_FRAME] ==
- cm->ref_frame_sign_bias[GOLDEN_FRAME] &&
- cm->ref_frame_sign_bias[LAST_FRAME] ==
- cm->ref_frame_sign_bias[ALTREF_FRAME]) {
+ // In the longer term the encoder should be generalized to match the
+ // decoder such that we allow compound where one of the 3 buffers has a
+ // differnt sign bias and that buffer is then the fixed ref. However, this
+ // requires further work in the rd loop. For now the only supported encoder
+ // side behaviour is where the ALT ref buffer has oppositie sign bias to
+ // the other two.
+ if ((cm->ref_frame_sign_bias[ALTREF_FRAME] ==
+ cm->ref_frame_sign_bias[GOLDEN_FRAME]) ||
+ (cm->ref_frame_sign_bias[ALTREF_FRAME] ==
+ cm->ref_frame_sign_bias[LAST_FRAME])) {
cm->allow_comp_inter_inter = 0;
} else {
cm->allow_comp_inter_inter = 1;