• Yushin Cho's avatar
    Add a new experiment, DAALA_DIST · 7a428ba2
    Yushin Cho authored
    This commit adds a new experiment, Daala's distortion function,
    which is designed to better approximate perceptual distortion
    in 8x8 pixel blocks.
    This experiment is expected to work best with PVQ.
    It measures the variance of overlapped 4x4 regions in the 8x8 area,
    then uses these variances to scale the MSE of weighted frequency domain
    distortion of 8x8 block.
    Since AV1 calculates distortion in blocks as small as 4x4, it is not possible to
    directly replace the existing distortion functions of AV1,
    such as dist_block() and block_rd_txf().
    Hence, there has been substantial changes in order to apply
    Daala's 8x8 distortion function.
    The daala distortion function is applied
    after all 4x4 tx blocks in a 8x8 block are encoded (during RDO),
    as in below two cases:
    1) intra/inter sub8x8 predictions and
    2) 4x4 transform with prediction size >= 8.
    To enable this experiment, add '--enable-daala-dist' with configure.
    TODO: Significant tuning of parameters is required since the function has
    originally came from Daala thus most parameters would not work
    correctly outside Daala.
    The fact that chroma distortion is added to the distortion of AV1's RDO is
    also critical since Daala's distortion function is applied to luma only
    and chroma continues to use MSE.
    Change-Id: If35fdd3aec7efe401f351ba1c99891ad57a3d957