• Rostislav Pehlivanov's avatar
    Rewrite msac.c · 33d16d81
    Rostislav Pehlivanov authored
    This rewrites msac.c to the point of there being no libaom project
    code left, hence changing the license of the file to the dav1d
    project's license.
    
    The rewrite much simplifies and optimizes entropy decoding.
    Some encoder specific code also remained, such as tell_offs, to
    tell the fractional amount of bits left, which the decoder does
    not need.
    
    ctx_refill is much simpler and has a tighter loop with less
    instructions, which on some CPUs can actually be ran in one cycle.
    The old mechanism which checked to see if the buffer reached the
    end to disable calling ctx_refill is gone, as all it saved was
    a mostly well predicted branch.
    The optimizations regarading this function enabled us to use
    an ec_win of 64 bits whilst improving performance. This was not
    possible with the old needlessly robust system.
    
    Some msac-specific API changes were made - msac_decode_bool now
    takes a scaled value directly rather than doing scaling itself.
    This saves a shift in most use cases as the function is mainly
    used to read equiprobable bools rather than ones with specific
    probabilities.
    
    There's still room for optimizations, mainly in that update_cdf
    could be SIMD'd. This commit prepares for some of them by
    moving the init function at the bottom of the file.
    
    Overall decoder speedup seems to be around 3%-5%, specific on
    bitrate and encoder as expected.
    33d16d81
Name
Last commit
Last update
..
arm Loading commit data...
ext/x86 Loading commit data...
win32 Loading commit data...
x86 Loading commit data...
cdef.h Loading commit data...
cdef_apply.h Loading commit data...
cdef_apply_tmpl.c Loading commit data...
cdef_tmpl.c Loading commit data...
cdf.c Loading commit data...
cdf.h Loading commit data...
cpu.c Loading commit data...
cpu.h Loading commit data...
data.c Loading commit data...
dav1d.rc.in Loading commit data...
decode.c Loading commit data...
decode.h Loading commit data...
dequant_tables.c Loading commit data...
dequant_tables.h Loading commit data...
env.h Loading commit data...
getbits.c Loading commit data...
getbits.h Loading commit data...
internal.h Loading commit data...
intra_edge.c Loading commit data...
intra_edge.h Loading commit data...
ipred.h Loading commit data...
ipred_prepare.h Loading commit data...
ipred_prepare_tmpl.c Loading commit data...
ipred_tmpl.c Loading commit data...
itx.h Loading commit data...
itx_1d.c Loading commit data...
itx_tmpl.c Loading commit data...
levels.h Loading commit data...
lf_apply.h Loading commit data...
lf_apply_tmpl.c Loading commit data...
lf_mask.c Loading commit data...
lf_mask.h Loading commit data...
lib.c Loading commit data...
loopfilter.h Loading commit data...
loopfilter_tmpl.c Loading commit data...
looprestoration.h Loading commit data...
looprestoration_tmpl.c Loading commit data...
lr_apply.h Loading commit data...
lr_apply_tmpl.c Loading commit data...
mc.h Loading commit data...
mc_tmpl.c Loading commit data...
meson.build Loading commit data...
msac.c Loading commit data...
msac.h Loading commit data...
obu.c Loading commit data...
obu.h Loading commit data...
picture.c Loading commit data...
picture.h Loading commit data...
qm.c Loading commit data...
qm.h Loading commit data...
recon.h Loading commit data...
recon_tmpl.c Loading commit data...
ref.c Loading commit data...
ref.h Loading commit data...
ref_mvs.c Loading commit data...
ref_mvs.h Loading commit data...
scan.c Loading commit data...
scan.h Loading commit data...
tables.c Loading commit data...
tables.h Loading commit data...
thread.h Loading commit data...
thread_data.h Loading commit data...
thread_task.c Loading commit data...
thread_task.h Loading commit data...
warpmv.c Loading commit data...
warpmv.h Loading commit data...
wedge.c Loading commit data...
wedge.h Loading commit data...