av1/encoder/ratectrl.c
// These functions use formulaic calculations to make playing with the
// quantizer tables easier. If necessary they can be replaced by lookup
// tables if and when things settle down in the experimental bitstream
These functions use formulaic calculations to make playing with the
quantizer tables easier. If necessary they can be replaced by lookup
tables if and when things settle down in the experimental bitstream
These functions use formulaic calculations to make playing with the quantizer tables easier . If necessary they can be replaced by lookup tables if and when things settle down in the experimental bitstream
double av1_convert_qindex_to_q(int qindex, aom_bit_depth_t bit_depth) {
  switch (bit_depth) {
    case AOM_BITS_8: return av1_ac_quant_QTX(qindex, 0, bit_depth) / 4.0;
    case AOM_BITS_10: return av1_ac_quant_QTX(qindex, 0, bit_depth) / 16.0;
    case AOM_BITS_12: return av1_ac_quant_QTX(qindex, 0, bit_depth) / 64.0;
    default:
      assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
      return -1.0;
  }
}
double av1_convert_qindex_to_q ( int qindex , aom_bit_depth_t bit_depth ) { switch ( bit_depth ) { case AOM_BITS_8 : return av1_ac_quant_QTX ( qindex , 0 , bit_depth ) / 4.0 ; case AOM_BITS_10 : return av1_ac_quant_QTX ( qindex , 0 , bit_depth ) / 16.0 ; case AOM_BITS_12 : return av1_ac_quant_QTX ( qindex , 0 , bit_depth ) / 64.0 ; default : assert ( 0 && " " ) ; return -1.0 ; } }
These functions use formulaic calculations to make playing with the
quantizer tables easier.
These functions use formulaic calculations to make playing with the quantizer tables easier .
// Convert the index to a real Q value (scaled down to match old Q values)