libavcodec/x86/cabac.h File Reference

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

Go to the source code of this file.

Defines

#define TABLES_ARG
#define RIP_ARG
#define BRANCHLESS_GET_CABAC_UPDATE(ret, low, range, tmp)
#define BRANCHLESS_GET_CABAC(ret, retq, statep, low, lowword, range, rangeq, tmp, tmpbyte, byte, end, norm_off, lps_off, mlps_off, tables)
#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,
retq,
statep,
low,
lowword,
range,
rangeq,
tmp,
tmpbyte,
byte,
end,
norm_off,
lps_off,
mlps_off,
tables   ) 

Value:

"movzbl "statep"    , "ret"                                     \n\t"\
        "mov    "range"     , "tmp"                                     \n\t"\
        "and    $0xC0       , "range"                                   \n\t"\
        "movzbl "MANGLE(ff_h264_cabac_tables)"+"lps_off"("ret", "range", 2), "range" \n\t"\
        "sub    "range"     , "tmp"                                     \n\t"\
        BRANCHLESS_GET_CABAC_UPDATE(ret, low, range, tmp)                    \
        "movzbl "MANGLE(ff_h264_cabac_tables)"+"norm_off"("range"), %%ecx    \n\t"\
        "shl    %%cl        , "range"                                   \n\t"\
        "movzbl "MANGLE(ff_h264_cabac_tables)"+"mlps_off"+128("ret"), "tmp"  \n\t"\
        "shl    %%cl        , "low"                                     \n\t"\
        "mov    "tmpbyte"   , "statep"                                  \n\t"\
        "test   "lowword"   , "lowword"                                 \n\t"\
        " jnz   2f                                                      \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_cabac_tables)"+"norm_off"(%%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"\
        "2:                                                             \n\t"

Definition at line 118 of file cabac.h.

#define BRANCHLESS_GET_CABAC_UPDATE ( ret,
low,
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 104 of file cabac.h.

#define get_cabac_bypass_sign   get_cabac_bypass_sign_x86

Definition at line 184 of file cabac.h.

Referenced by decode_cabac_mb_mvd().

#define RIP_ARG

Definition at line 91 of file cabac.h.

#define TABLES_ARG

Definition at line 90 of file cabac.h.


Function Documentation

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

Definition at line 185 of file cabac.h.


Generated on Fri Oct 26 02:47:55 2012 for FFmpeg by  doxygen 1.5.8