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 (H264Context *h, H264Picture *pic, int n, int height, int y_offset, int list)
 
static void get_lowest_part_y (H264Context *h, int refs[2][48], int n, int height, int y_offset, int list0, int list1, int *nrefs)
 
static void await_references (H264Context *h)
 Wait until all reference frames are available for MC operations.
 
static av_always_inline void mc_dir_part (H264Context *h, H264Picture *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, 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 (H264Context *h, 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, qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, 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 (H264Context *h, 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, 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 (H264Context *h, int list, int pixel_shift, int chroma_idc)
 
static av_always_inline void xchg_mb_border (H264Context *h, 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 (H264Context *h, int mb_type, int is_h264, int simple, int transform_bypass, int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p)
 
static av_always_inline void hl_decode_mb_idct_luma (H264Context *h, int mb_type, int is_h264, int simple, int transform_bypass, int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p)
 
void ff_h264_hl_decode_mb (H264Context *h)
 

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 { \
AV_COPY128(b, a); \
} \
} else if (xchg) \
AV_SWAP64(b, a); \

Referenced by xchg_mb_border().

#define BITS   8

Definition at line 796 of file h264_mb.c.

#define SIMPLE   1

Definition at line 800 of file h264_mb.c.

Referenced by hl_decode_mb(), and hl_decode_mb_444().

#define BITS   16

Definition at line 796 of file h264_mb.c.

#define SIMPLE   0

Definition at line 800 of file h264_mb.c.

Function Documentation

static int get_lowest_part_list_y ( H264Context h,
H264Picture pic,
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 ( H264Context h,
int  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 ( H264Context h)
static

Wait until all reference frames are available for MC operations.

Parameters
hthe H264 context

Definition at line 95 of file h264_mb.c.

Referenced by hl_motion().

static av_always_inline void mc_dir_part ( H264Context h,
H264Picture 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,
qpel_mc_func qpix_op,
h264_chroma_mc_func  chroma_op,
int  pixel_shift,
int  chroma_idc 
)
static

Definition at line 203 of file h264_mb.c.

Referenced by mc_part_std(), and mc_part_weighted().

static av_always_inline void mc_part_std ( H264Context h,
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,
qpel_mc_func qpix_put,
h264_chroma_mc_func  chroma_put,
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 318 of file h264_mb.c.

static av_always_inline void mc_part_weighted ( H264Context h,
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,
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 365 of file h264_mb.c.

Referenced by mc_part().

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

Definition at line 472 of file h264_mb.c.

Referenced by hl_motion().

static av_always_inline void xchg_mb_border ( H264Context h,
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 496 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 582 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 591 of file h264_mb.c.

Referenced by hl_decode_mb_predict_luma().

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

Definition at line 600 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 ( H264Context h,
int  mb_type,
int  is_h264,
int  simple,
int  transform_bypass,
int  pixel_shift,
int *  block_offset,
int  linesize,
uint8_t dest_y,
int  p 
)
static

Definition at line 721 of file h264_mb.c.

Referenced by hl_decode_mb(), and hl_decode_mb_444().

void ff_h264_hl_decode_mb ( H264Context h)

Definition at line 803 of file h264_mb.c.

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