FFmpeg
Macros | Functions
h264_mb.c File Reference
#include <stdint.h>
#include "config.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "h264dec.h"
#include "h264_ps.h"
#include "qpeldsp.h"
#include "thread.h"
#include "h264_mb_template.c"

Go to the source code of this file.

Macros

#define XCHG(a, b, xchg)
 
#define BITS   8
 
#define SIMPLE   1
 
#define BITS   16
 
#define SIMPLE   0
 

Functions

static int get_lowest_part_list_y (H264SliceContext *sl, int n, int height, int y_offset, int list)
 
static void get_lowest_part_y (const H264Context *h, H264SliceContext *sl, int16_t refs[2][48], int n, int height, int y_offset, int list0, int list1, int *nrefs)
 
static void await_references (const H264Context *h, H264SliceContext *sl)
 Wait until all reference frames are available for MC operations. More...
 
static av_always_inline void mc_dir_part (const H264Context *h, H264SliceContext *sl, H264Ref *pic, int n, int square, int height, int delta, int list, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int src_x_offset, int src_y_offset, const qpel_mc_func *qpix_op, h264_chroma_mc_func chroma_op, int pixel_shift, int chroma_idc)
 
static av_always_inline void mc_part_std (const H264Context *h, H264SliceContext *sl, int n, int square, int height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, const qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, const qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, int list0, int list1, int pixel_shift, int chroma_idc)
 
static av_always_inline void mc_part_weighted (const H264Context *h, H264SliceContext *sl, int n, int square, int height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, const qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, h264_weight_func luma_weight_op, h264_weight_func chroma_weight_op, h264_biweight_func luma_weight_avg, h264_biweight_func chroma_weight_avg, int list0, int list1, int pixel_shift, int chroma_idc)
 
static av_always_inline void prefetch_motion (const H264Context *h, H264SliceContext *sl, int list, int pixel_shift, int chroma_idc)
 
static av_always_inline void xchg_mb_border (const H264Context *h, H264SliceContext *sl, uint8_t *src_y, uint8_t *src_cb, uint8_t *src_cr, int linesize, int uvlinesize, int xchg, int chroma444, int simple, int pixel_shift)
 
static av_always_inline int dctcoef_get (int16_t *mb, int high_bit_depth, int index)
 
static av_always_inline void dctcoef_set (int16_t *mb, int high_bit_depth, int index, int value)
 
static av_always_inline void hl_decode_mb_predict_luma (const H264Context *h, H264SliceContext *sl, int mb_type, int simple, int transform_bypass, int pixel_shift, const int *block_offset, int linesize, uint8_t *dest_y, int p)
 
static av_always_inline void hl_decode_mb_idct_luma (const H264Context *h, H264SliceContext *sl, int mb_type, int simple, int transform_bypass, int pixel_shift, const int *block_offset, int linesize, uint8_t *dest_y, int p)
 
void ff_h264_hl_decode_mb (const H264Context *h, H264SliceContext *sl)
 

Detailed Description

H.264 / AVC / MPEG-4 part10 macroblock decoding

Definition in file h264_mb.c.

Macro Definition Documentation

◆ XCHG

#define XCHG (   a,
  b,
  xchg 
)
Value:
if (pixel_shift) { \
if (xchg) { \
AV_SWAP64(b + 0, a + 0); \
AV_SWAP64(b + 8, a + 8); \
} else { \
AV_COPY128(b, a); \
} \
} else if (xchg) \
AV_SWAP64(b, a); \

◆ BITS [1/2]

#define BITS   8

Definition at line 792 of file h264_mb.c.

◆ SIMPLE [1/2]

#define SIMPLE   1

Definition at line 796 of file h264_mb.c.

◆ BITS [2/2]

#define BITS   16

Definition at line 792 of file h264_mb.c.

◆ SIMPLE [2/2]

#define SIMPLE   0

Definition at line 796 of file h264_mb.c.

Function Documentation

◆ get_lowest_part_list_y()

static int get_lowest_part_list_y ( H264SliceContext sl,
int  n,
int  height,
int  y_offset,
int  list 
)
inlinestatic

Definition at line 39 of file h264_mb.c.

Referenced by get_lowest_part_y().

◆ get_lowest_part_y()

static void get_lowest_part_y ( const H264Context h,
H264SliceContext sl,
int16_t  refs[2][48],
int  n,
int  height,
int  y_offset,
int  list0,
int  list1,
int nrefs 
)
inlinestatic

Definition at line 52 of file h264_mb.c.

Referenced by await_references().

◆ await_references()

static void await_references ( const H264Context h,
H264SliceContext sl 
)
static

Wait until all reference frames are available for MC operations.

Parameters
hthe H.264 context

Definition at line 96 of file h264_mb.c.

Referenced by hl_motion().

◆ mc_dir_part()

static av_always_inline void mc_dir_part ( const H264Context h,
H264SliceContext sl,
H264Ref pic,
int  n,
int  square,
int  height,
int  delta,
int  list,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  src_x_offset,
int  src_y_offset,
const qpel_mc_func qpix_op,
h264_chroma_mc_func  chroma_op,
int  pixel_shift,
int  chroma_idc 
)
static

Definition at line 205 of file h264_mb.c.

Referenced by mc_part_std(), and mc_part_weighted().

◆ mc_part_std()

static av_always_inline void mc_part_std ( const H264Context h,
H264SliceContext sl,
int  n,
int  square,
int  height,
int  delta,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  x_offset,
int  y_offset,
const qpel_mc_func qpix_put,
h264_chroma_mc_func  chroma_put,
const qpel_mc_func qpix_avg,
h264_chroma_mc_func  chroma_avg,
int  list0,
int  list1,
int  pixel_shift,
int  chroma_idc 
)
static

Definition at line 321 of file h264_mb.c.

◆ mc_part_weighted()

static av_always_inline void mc_part_weighted ( const H264Context h,
H264SliceContext sl,
int  n,
int  square,
int  height,
int  delta,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  x_offset,
int  y_offset,
const qpel_mc_func qpix_put,
h264_chroma_mc_func  chroma_put,
h264_weight_func  luma_weight_op,
h264_weight_func  chroma_weight_op,
h264_biweight_func  luma_weight_avg,
h264_biweight_func  chroma_weight_avg,
int  list0,
int  list1,
int  pixel_shift,
int  chroma_idc 
)
static

Definition at line 369 of file h264_mb.c.

Referenced by mc_part().

◆ prefetch_motion()

static av_always_inline void prefetch_motion ( const H264Context h,
H264SliceContext sl,
int  list,
int  pixel_shift,
int  chroma_idc 
)
static

Definition at line 483 of file h264_mb.c.

Referenced by hl_motion().

◆ xchg_mb_border()

static av_always_inline void xchg_mb_border ( const H264Context h,
H264SliceContext sl,
uint8_t src_y,
uint8_t src_cb,
uint8_t src_cr,
int  linesize,
int  uvlinesize,
int  xchg,
int  chroma444,
int  simple,
int  pixel_shift 
)
static

Definition at line 508 of file h264_mb.c.

Referenced by hl_decode_mb(), and hl_decode_mb_444().

◆ dctcoef_get()

static av_always_inline int dctcoef_get ( int16_t *  mb,
int  high_bit_depth,
int  index 
)
static

Definition at line 595 of file h264_mb.c.

Referenced by hl_decode_mb(), hl_decode_mb_idct_luma(), and hl_decode_mb_predict_luma().

◆ dctcoef_set()

static av_always_inline void dctcoef_set ( int16_t *  mb,
int  high_bit_depth,
int  index,
int  value 
)
static

Definition at line 604 of file h264_mb.c.

Referenced by hl_decode_mb_predict_luma().

◆ hl_decode_mb_predict_luma()

static av_always_inline void hl_decode_mb_predict_luma ( const H264Context h,
H264SliceContext sl,
int  mb_type,
int  simple,
int  transform_bypass,
int  pixel_shift,
const int block_offset,
int  linesize,
uint8_t dest_y,
int  p 
)
static

Definition at line 613 of file h264_mb.c.

Referenced by hl_decode_mb(), and hl_decode_mb_444().

◆ hl_decode_mb_idct_luma()

static av_always_inline void hl_decode_mb_idct_luma ( const H264Context h,
H264SliceContext sl,
int  mb_type,
int  simple,
int  transform_bypass,
int  pixel_shift,
const int block_offset,
int  linesize,
uint8_t dest_y,
int  p 
)
static

Definition at line 727 of file h264_mb.c.

Referenced by hl_decode_mb(), and hl_decode_mb_444().

◆ ff_h264_hl_decode_mb()

void ff_h264_hl_decode_mb ( const H264Context h,
H264SliceContext sl 
)

Definition at line 799 of file h264_mb.c.

Referenced by decode_slice(), and h264_er_decode_mb().

b
#define b
Definition: input.c:41
AV_COPY64
#define AV_COPY64(d, s)
Definition: intreadwrite.h:605
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41