• Ronald S. Bultje's avatar
    Rewrite reference frame costing in the RD loop. · 0b8a95a0
    Ronald S. Bultje authored
    I now see I didn't write a very long description, so let's do it
    here then. We took a pretty big quality hit (0.1-0.2%) from my
    recent fix of the inversion of arguments to vp8_cost_bit() in the
    RD reference frame costing. I looked into it and basically the
    costing prevented us from switching reference frames. This is of
    course silly, since each frame codes its own prob_intra_coded, so
    using last frame cost indications as a limiting factor can never
    be right.
    
    Here, I've rewritten that code to estimate costings based partially
    on statistics from progress on current frame encoding. Overall,
    this gives us a ~0.2%-0.3% improvement over what we had previously
    before my argument-inversion-fix, and thus about ~0.4% over current
    git (on derf-set), and a little more (0.5-1.0%) on HD/STD-HD/YT.
    
    Change-Id: I79ebd4ccec4d6edbf0e152d9590d103ba2747775
    0b8a95a0
decodframe.c 30.00 KiB
/*
 *  Copyright (c) 2010 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 "onyxd_int.h"
#include "header.h"
#include "reconintra.h"
#include "reconintra4x4.h"
#include "recon.h"
#include "reconinter.h"
#include "dequantize.h"
#include "detokenize.h"
#include "invtrans.h"
#include "alloccommon.h"
#include "entropymode.h"
#include "quant_common.h"
#include "vpx_scale/vpxscale.h"
#include "vpx_scale/yv12extend.h"
#include "setupintrarecon.h"
#include "decodemv.h"
#include "extend.h"
#include "vpx_mem/vpx_mem.h"
#include "idct.h"
#include "dequantize.h"
#include "predictdc.h"
#include "threading.h"
#include "decoderthreading.h"
#include "dboolhuff.h"
#include <assert.h>
#include <stdio.h>
void vp8cx_init_de_quantizer(VP8D_COMP *pbi)
    int i;
    int Q;
    VP8_COMMON *const pc = & pbi->common;
    for (Q = 0; Q < QINDEX_RANGE; Q++)
        pc->Y1dequant[Q][0] = (short)vp8_dc_quant(Q, pc->y1dc_delta_q);
        pc->Y2dequant[Q][0] = (short)vp8_dc2quant(Q, pc->y2dc_delta_q);
        pc->UVdequant[Q][0] = (short)vp8_dc_uv_quant(Q, pc->uvdc_delta_q);
        /* all the ac values = ; */
        for (i = 1; i < 16; i++)
            int rc = vp8_default_zig_zag1d[i];
            pc->Y1dequant[Q][rc] = (short)vp8_ac_yquant(Q);
            pc->Y2dequant[Q][rc] = (short)vp8_ac2quant(Q, pc->y2ac_delta_q);
            pc->UVdequant[Q][rc] = (short)vp8_ac_uv_quant(Q, pc->uvac_delta_q);
void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd)
    int i;
    int QIndex;
    MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
    VP8_COMMON *const pc = & pbi->common;