FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
h264_mb.c File Reference

H.264 / AVC / MPEG4 part10 macroblock decoding. More...

#include <stdint.h>
#include "config.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "h264.h"
#include "qpeldsp.h"
#include "svq3.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 is_h264, 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 is_h264, 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 / MPEG4 part10 macroblock decoding.

Definition in file h264_mb.c.

Macro Definition Documentation

#define XCHG (   a,
  b,
  xchg 
)
Value:
if (pixel_shift) { \
if (xchg) { \
AV_SWAP64(b + 0, a + 0); \
AV_SWAP64(b + 8, a + 8); \
} else { \
} \
} else if (xchg) \
const char * b
Definition: vf_curves.c:109
if()
Definition: avfilter.c:975
#define AV_COPY64(d, s)
Definition: intreadwrite.h:590
#define AV_SWAP64(a, b)
Definition: intreadwrite.h:604
#define AV_COPY128(d, s)
Definition: intreadwrite.h:594

Referenced by xchg_mb_border().

#define BITS   8

Definition at line 811 of file h264_mb.c.

#define SIMPLE   1

Definition at line 815 of file h264_mb.c.

Referenced by hl_decode_mb(), and hl_decode_mb_444().

#define BITS   16

Definition at line 811 of file h264_mb.c.

#define SIMPLE   0

Definition at line 815 of file h264_mb.c.

Function Documentation

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().

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().

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

Wait until all reference frames are available for MC operations.

Parameters
hthe H264 context

Definition at line 96 of file h264_mb.c.

Referenced by hl_motion().

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().

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.

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().

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().

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().

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().

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().

static av_always_inline void hl_decode_mb_predict_luma ( const H264Context h,
H264SliceContext sl,
int  mb_type,
int  is_h264,
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().

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

Definition at line 735 of file h264_mb.c.

Referenced by hl_decode_mb(), and hl_decode_mb_444().

void ff_h264_hl_decode_mb ( const H264Context h,
H264SliceContext sl 
)

Definition at line 818 of file h264_mb.c.

Referenced by decode_slice(), h264_er_decode_mb(), and svq3_decode_frame().