libavcodec/x86/cabac.h File Reference

#include "libavcodec/cabac.h"
#include "libavutil/attributes.h"
#include "libavutil/x86_cpu.h"
#include "config.h"

Go to the source code of this file.

Defines

#define BRANCHLESS_GET_CABAC_UPDATE(ret, statep, low, lowword, range, tmp)
#define BRANCHLESS_GET_CABAC(ret, statep, low, lowword, range, tmp, tmpbyte, byte)
#define get_cabac_bypass_sign   get_cabac_bypass_sign_x86

Functions

static av_always_inline int get_cabac_bypass_sign_x86 (CABACContext *c, int val)


Define Documentation

#define BRANCHLESS_GET_CABAC ( ret,
statep,
low,
lowword,
range,
tmp,
tmpbyte,
byte   ) 

Value:

"movzbl "statep"    , "ret"                                     \n\t"\
        "mov    "range"     , "tmp"                                     \n\t"\
        "and    $0xC0       , "range"                                   \n\t"\
        "movzbl "MANGLE(ff_h264_lps_range)"("ret", "range", 2), "range" \n\t"\
        "sub    "range"     , "tmp"                                     \n\t"\
        BRANCHLESS_GET_CABAC_UPDATE(ret, statep, low, lowword, range, tmp)   \
        "movzbl " MANGLE(ff_h264_norm_shift) "("range"), %%ecx          \n\t"\
        "shl    %%cl        , "range"                                   \n\t"\
        "movzbl "MANGLE(ff_h264_mlps_state)"+128("ret"), "tmp"          \n\t"\
        "shl    %%cl        , "low"                                     \n\t"\
        "mov    "tmpbyte"   , "statep"                                  \n\t"\
        "test   "lowword"   , "lowword"                                 \n\t"\
        " jnz   1f                                                      \n\t"\
        "mov    "byte"      , %%"REG_c"                                 \n\t"\
        "add"OPSIZE" $2     , "byte"                                    \n\t"\
        "movzwl (%%"REG_c")     , "tmp"                                 \n\t"\
        "lea    -1("low")   , %%ecx                                     \n\t"\
        "xor    "low"       , %%ecx                                     \n\t"\
        "shr    $15         , %%ecx                                     \n\t"\
        "bswap  "tmp"                                                   \n\t"\
        "shr    $15         , "tmp"                                     \n\t"\
        "movzbl " MANGLE(ff_h264_norm_shift) "(%%ecx), %%ecx            \n\t"\
        "sub    $0xFFFF     , "tmp"                                     \n\t"\
        "neg    %%ecx                                                   \n\t"\
        "add    $7          , %%ecx                                     \n\t"\
        "shl    %%cl        , "tmp"                                     \n\t"\
        "add    "tmp"       , "low"                                     \n\t"\
        "1:                                                             \n\t"

Definition at line 54 of file cabac.h.

#define BRANCHLESS_GET_CABAC_UPDATE ( ret,
statep,
low,
lowword,
range,
tmp   ) 

Value:

"mov    "tmp"       , %%ecx     \n\t"\
        "shl    $17         , "tmp"     \n\t"\
        "sub    "low"       , "tmp"     \n\t"\
        "sar    $31         , "tmp"     \n\t" /*lps_mask*/\
        "sub    %%ecx       , "range"   \n\t" /*RangeLPS - range*/\
        "and    "tmp"       , "range"   \n\t" /*(RangeLPS - range)&lps_mask*/\
        "add    %%ecx       , "range"   \n\t" /*new range*/\
        "shl    $17         , %%ecx     \n\t"\
        "and    "tmp"       , %%ecx     \n\t"\
        "sub    %%ecx       , "low"     \n\t"\
        "xor    "tmp"       , "ret"     \n\t"

Definition at line 40 of file cabac.h.

#define get_cabac_bypass_sign   get_cabac_bypass_sign_x86

Definition at line 105 of file cabac.h.

Referenced by decode_cabac_mb_mvd().


Function Documentation

static av_always_inline int get_cabac_bypass_sign_x86 ( CABACContext c,
int  val 
) [static]

Definition at line 106 of file cabac.h.


Generated on Fri Oct 26 02:46:07 2012 for FFmpeg by  doxygen 1.5.8