FFmpeg
Macros | Functions | Variables
filter.c File Reference
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "hevcdec.h"
#include "progressframe.h"

Go to the source code of this file.

Macros

#define LUMA   0
 
#define CB   1
 
#define CR   2
 
#define CTB(tab, x, y)   ((tab)[(y) * sps->ctb_width + (x)])
 
#define TC_CALC(qp, bs)
 

Functions

static int chroma_tc (const HEVCPPS *pps, const HEVCSPS *sps, int qp_y, int c_idx, int tc_offset)
 
static int get_qPy_pred (HEVCLocalContext *lc, const HEVCContext *s, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int xBase, int yBase, int log2_cb_size)
 
void ff_hevc_set_qPy (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int xBase, int yBase, int log2_cb_size)
 
static int get_qPy (const HEVCSPS *sps, const int8_t *qp_y_tab, int xC, int yC)
 
static void copy_CTB (uint8_t *dst, const uint8_t *src, int width, int height, ptrdiff_t stride_dst, ptrdiff_t stride_src)
 
static void copy_pixel (uint8_t *dst, const uint8_t *src, int pixel_shift)
 
static void copy_vert (uint8_t *dst, const uint8_t *src, int pixel_shift, int height, ptrdiff_t stride_dst, ptrdiff_t stride_src)
 
static void copy_CTB_to_hv (const HEVCLayerContext *l, const HEVCSPS *sps, const uint8_t *src, ptrdiff_t stride_src, int x, int y, int width, int height, int c_idx, int x_ctb, int y_ctb)
 
static void restore_tqb_pixels (const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, uint8_t *src1, const uint8_t *dst1, ptrdiff_t stride_src, ptrdiff_t stride_dst, int x0, int y0, int width, int height, int c_idx)
 
static void sao_filter_CTB (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCContext *s, const HEVCPPS *pps, const HEVCSPS *sps, int x, int y)
 
static int get_pcm (const HEVCSPS *sps, const uint8_t *is_pcm, int x, int y)
 
static void deblocking_filter_CTB (const HEVCContext *s, const HEVCLayerContext *l, const HEVCPPS *pps, const HEVCSPS *sps, int x0, int y0)
 
static int boundary_strength (const HEVCContext *s, const MvField *curr, const MvField *neigh, const RefPicList *neigh_refPicList)
 
void ff_hevc_deblocking_boundary_strengths (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x0, int y0, int log2_trafo_size)
 
void ff_hevc_hls_filter (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x, int y, int ctb_size)
 
void ff_hevc_hls_filters (HEVCLocalContext *lc, const HEVCLayerContext *l, const HEVCPPS *pps, int x_ctb, int y_ctb, int ctb_size)
 

Variables

static const uint8_t tctable [54]
 
static const uint8_t betatable [52]
 

Macro Definition Documentation

◆ LUMA

#define LUMA   0

Definition at line 31 of file filter.c.

◆ CB

#define CB   1

Definition at line 32 of file filter.c.

◆ CR

#define CR   2

Definition at line 33 of file filter.c.

◆ CTB

#define CTB (   tab,
  x,
 
)    ((tab)[(y) * sps->ctb_width + (x)])

Definition at line 267 of file filter.c.

◆ TC_CALC

#define TC_CALC (   qp,
  bs 
)
Value:
tctable[av_clip((qp) + DEFAULT_INTRA_TC_OFFSET * ((bs) - 1) + \
(tc_offset & -2), \

Definition at line 496 of file filter.c.

Function Documentation

◆ chroma_tc()

static int chroma_tc ( const HEVCPPS pps,
const HEVCSPS sps,
int  qp_y,
int  c_idx,
int  tc_offset 
)
static

Definition at line 47 of file filter.c.

Referenced by deblocking_filter_CTB().

◆ get_qPy_pred()

static int get_qPy_pred ( HEVCLocalContext lc,
const HEVCContext s,
const HEVCLayerContext l,
const HEVCPPS pps,
const HEVCSPS sps,
int  xBase,
int  yBase,
int  log2_cb_size 
)
static

Definition at line 77 of file filter.c.

Referenced by ff_hevc_set_qPy().

◆ ff_hevc_set_qPy()

void ff_hevc_set_qPy ( HEVCLocalContext lc,
const HEVCLayerContext l,
const HEVCPPS pps,
int  xBase,
int  yBase,
int  log2_cb_size 
)

Definition at line 122 of file filter.c.

Referenced by hls_coding_unit(), and hls_transform_unit().

◆ get_qPy()

static int get_qPy ( const HEVCSPS sps,
const int8_t *  qp_y_tab,
int  xC,
int  yC 
)
static

Definition at line 138 of file filter.c.

Referenced by deblocking_filter_CTB().

◆ copy_CTB()

static void copy_CTB ( uint8_t *  dst,
const uint8_t *  src,
int  width,
int  height,
ptrdiff_t  stride_dst,
ptrdiff_t  stride_src 
)
static

Definition at line 146 of file filter.c.

Referenced by sao_filter_CTB().

◆ copy_pixel()

static void copy_pixel ( uint8_t *  dst,
const uint8_t *  src,
int  pixel_shift 
)
static

Definition at line 179 of file filter.c.

Referenced by sao_filter_CTB().

◆ copy_vert()

static void copy_vert ( uint8_t *  dst,
const uint8_t *  src,
int  pixel_shift,
int  height,
ptrdiff_t  stride_dst,
ptrdiff_t  stride_src 
)
static

Definition at line 187 of file filter.c.

Referenced by copy_CTB_to_hv(), and sao_filter_CTB().

◆ copy_CTB_to_hv()

static void copy_CTB_to_hv ( const HEVCLayerContext l,
const HEVCSPS sps,
const uint8_t *  src,
ptrdiff_t  stride_src,
int  x,
int  y,
int  width,
int  height,
int  c_idx,
int  x_ctb,
int  y_ctb 
)
static

Definition at line 207 of file filter.c.

Referenced by sao_filter_CTB().

◆ restore_tqb_pixels()

static void restore_tqb_pixels ( const HEVCLayerContext l,
const HEVCPPS pps,
const HEVCSPS sps,
uint8_t *  src1,
const uint8_t *  dst1,
ptrdiff_t  stride_src,
ptrdiff_t  stride_dst,
int  x0,
int  y0,
int  width,
int  height,
int  c_idx 
)
static

Definition at line 228 of file filter.c.

Referenced by sao_filter_CTB().

◆ sao_filter_CTB()

static void sao_filter_CTB ( HEVCLocalContext lc,
const HEVCLayerContext l,
const HEVCContext s,
const HEVCPPS pps,
const HEVCSPS sps,
int  x,
int  y 
)
static

Definition at line 269 of file filter.c.

Referenced by ff_hevc_hls_filter().

◆ get_pcm()

static int get_pcm ( const HEVCSPS sps,
const uint8_t *  is_pcm,
int  x,
int  y 
)
static

Definition at line 480 of file filter.c.

Referenced by deblocking_filter_CTB().

◆ deblocking_filter_CTB()

static void deblocking_filter_CTB ( const HEVCContext s,
const HEVCLayerContext l,
const HEVCPPS pps,
const HEVCSPS sps,
int  x0,
int  y0 
)
static

Definition at line 501 of file filter.c.

Referenced by ff_hevc_hls_filter().

◆ boundary_strength()

static int boundary_strength ( const HEVCContext s,
const MvField curr,
const MvField neigh,
const RefPicList neigh_refPicList 
)
static

Definition at line 678 of file filter.c.

Referenced by ff_hevc_deblocking_boundary_strengths().

◆ ff_hevc_deblocking_boundary_strengths()

void ff_hevc_deblocking_boundary_strengths ( HEVCLocalContext lc,
const HEVCLayerContext l,
const HEVCPPS pps,
int  x0,
int  y0,
int  log2_trafo_size 
)

Definition at line 742 of file filter.c.

Referenced by hls_coding_unit(), hls_pcm_sample(), and hls_transform_tree().

◆ ff_hevc_hls_filter()

void ff_hevc_hls_filter ( HEVCLocalContext lc,
const HEVCLayerContext l,
const HEVCPPS pps,
int  x,
int  y,
int  ctb_size 
)

Definition at line 872 of file filter.c.

Referenced by ff_hevc_hls_filters(), hls_decode_entry(), and hls_decode_entry_wpp().

◆ ff_hevc_hls_filters()

void ff_hevc_hls_filters ( HEVCLocalContext lc,
const HEVCLayerContext l,
const HEVCPPS pps,
int  x_ctb,
int  y_ctb,
int  ctb_size 
)

Definition at line 912 of file filter.c.

Referenced by hls_decode_entry(), and hls_decode_entry_wpp().

Variable Documentation

◆ tctable

const uint8_t tctable[54]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,
5, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14, 16, 18, 20, 22, 24
}

Definition at line 35 of file filter.c.

Referenced by chroma_tc().

◆ betatable

const uint8_t betatable[52]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36,
38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64
}

Definition at line 41 of file filter.c.

Referenced by deblocking_filter_CTB().

av_clip
#define av_clip
Definition: common.h:100
DEFAULT_INTRA_TC_OFFSET
#define DEFAULT_INTRA_TC_OFFSET
Definition: filter.c:36
tctable
static const uint8_t tctable[54]
Definition: filter.c:35
MAX_QP
#define MAX_QP
Definition: hevcdec.h:50