|
FFmpeg
|
#include "libavcodec/get_bits.h"#include "hevcdec.h"#include "libavcodec/bit_depth_template.c"#include "dsp.h"#include "libavcodec/h26x/h2656_sao_template.c"#include "libavcodec/h26x/h2656_inter_template.c"#include "libavcodec/h26x/h2656_deblock_template.c"Go to the source code of this file.
Macros | |
| #define | SET(dst, x) |
| #define | SCALE(dst, x) |
| #define | TR_4x4_LUMA(dst, src, step, assign) |
| #define | TR_4(dst, src, dstep, sstep, assign, end) |
| #define | TR_8(dst, src, dstep, sstep, assign, end) |
| #define | TR_16(dst, src, dstep, sstep, assign, end) |
| #define | TR_32(dst, src, dstep, sstep, assign, end) |
| #define | IDCT_VAR4(H) |
| #define | IDCT_VAR8(H) |
| #define | IDCT_VAR16(H) |
| #define | IDCT_VAR32(H) |
| #define | IDCT(H) |
| #define | IDCT_DC(H) |
| #define | ff_hevc_pel_filters ff_hevc_qpel_filters |
| #define | DECL_HV_FILTER(f) |
| #define | FW_PUT(p, f, t) |
| #define | FW_PUT_UNI(p, f, t) |
| #define | FW_PUT_UNI_W(p, f, t) |
| #define | FW_PUT_FUNCS(f, t, dir) |
| #define | QPEL_FILTER(src, stride) |
| #define | EPEL_FILTER(src, stride) |
| #define | P3 pix[-4 * xstride] |
| #define | P2 pix[-3 * xstride] |
| #define | P1 pix[-2 * xstride] |
| #define | P0 pix[-1 * xstride] |
| #define | Q0 pix[0 * xstride] |
| #define | Q1 pix[1 * xstride] |
| #define | Q2 pix[2 * xstride] |
| #define | Q3 pix[3 * xstride] |
| #define | TP3 pix[-4 * xstride + 3 * ystride] |
| #define | TP2 pix[-3 * xstride + 3 * ystride] |
| #define | TP1 pix[-2 * xstride + 3 * ystride] |
| #define | TP0 pix[-1 * xstride + 3 * ystride] |
| #define | TQ0 pix[0 * xstride + 3 * ystride] |
| #define | TQ1 pix[1 * xstride + 3 * ystride] |
| #define | TQ2 pix[2 * xstride + 3 * ystride] |
| #define | TQ3 pix[3 * xstride + 3 * ystride] |
Functions | |
| static void FUNC | put_pcm (uint8_t *_dst, ptrdiff_t stride, int width, int height, GetBitContext *gb, int pcm_bit_depth) |
| static av_always_inline void FUNC | add_residual (uint8_t *restrict dst8, const int16_t *restrict res, ptrdiff_t stride, int size) |
| static void FUNC | add_residual4x4 (uint8_t *_dst, const int16_t *res, ptrdiff_t stride) |
| static void FUNC | add_residual8x8 (uint8_t *_dst, const int16_t *res, ptrdiff_t stride) |
| static void FUNC | add_residual16x16 (uint8_t *_dst, const int16_t *res, ptrdiff_t stride) |
| static void FUNC | add_residual32x32 (uint8_t *_dst, const int16_t *res, ptrdiff_t stride) |
| static void FUNC | transform_rdpcm (int16_t *_coeffs, int16_t log2_size, int mode) |
| static void FUNC | dequant (int16_t *coeffs, int16_t log2_size) |
| HEVC transform dequantization (ITU-T H.265 8.6.3) | |
| static void FUNC | transform_4x4_luma (int16_t *coeffs) |
| static void FUNC | put_hevc_pel_bi_pixels (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_pel_bi_w_pixels (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_qpel_bi_h (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_qpel_bi_v (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_qpel_bi_hv (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_qpel_bi_w_h (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_qpel_bi_w_v (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_qpel_bi_w_hv (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_epel_bi_h (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_epel_bi_v (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_epel_bi_hv (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_epel_bi_w_h (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_epel_bi_w_v (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox, intptr_t mx, intptr_t my, int width) |
| static void FUNC | put_hevc_epel_bi_w_hv (uint8_t *_dst, ptrdiff_t _dststride, const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2, int height, int denom, int wx0, int wx1, int ox, intptr_t mx, intptr_t my, int width) |
| static void FUNC | hevc_loop_filter_luma (uint8_t *_pix, ptrdiff_t _xstride, ptrdiff_t _ystride, int beta, const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q) |
| static void FUNC | hevc_loop_filter_chroma (uint8_t *_pix, ptrdiff_t _xstride, ptrdiff_t _ystride, const int *_tc, const uint8_t *_no_p, const uint8_t *_no_q) |
| static void FUNC | hevc_h_loop_filter_chroma (uint8_t *pix, ptrdiff_t stride, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q) |
| static void FUNC | hevc_v_loop_filter_chroma (uint8_t *pix, ptrdiff_t stride, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q) |
| static void FUNC | hevc_h_loop_filter_luma (uint8_t *pix, ptrdiff_t stride, int beta, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q) |
| static void FUNC | hevc_v_loop_filter_luma (uint8_t *pix, ptrdiff_t stride, int beta, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q) |
| #define SET | ( | dst, | |
| x ) |
Definition at line 152 of file dsp_template.c.
| #define SCALE | ( | dst, | |
| x ) |
Definition at line 153 of file dsp_template.c.
Definition at line 155 of file dsp_template.c.
Referenced by transform_4x4_luma().
Definition at line 205 of file dsp_template.c.
Definition at line 221 of file dsp_template.c.
Definition at line 237 of file dsp_template.c.
| #define IDCT_VAR4 | ( | H | ) |
Definition at line 253 of file dsp_template.c.
| #define IDCT_VAR8 | ( | H | ) |
Definition at line 255 of file dsp_template.c.
| #define IDCT_VAR16 | ( | H | ) |
Definition at line 258 of file dsp_template.c.
| #define IDCT_VAR32 | ( | H | ) |
Definition at line 259 of file dsp_template.c.
| #define IDCT | ( | H | ) |
| #define IDCT_DC | ( | H | ) |
Definition at line 286 of file dsp_template.c.
| #define ff_hevc_pel_filters ff_hevc_qpel_filters |
Definition at line 322 of file dsp_template.c.
| #define DECL_HV_FILTER | ( | f | ) |
Definition at line 323 of file dsp_template.c.
| #define FW_PUT | ( | p, | |
| f, | |||
| t ) |
Definition at line 327 of file dsp_template.c.
| #define FW_PUT_UNI | ( | p, | |
| f, | |||
| t ) |
Definition at line 335 of file dsp_template.c.
| #define FW_PUT_UNI_W | ( | p, | |
| f, | |||
| t ) |
Definition at line 343 of file dsp_template.c.
| #define FW_PUT_FUNCS | ( | f, | |
| t, | |||
| dir ) |
Definition at line 422 of file dsp_template.c.
Referenced by put_hevc_qpel_bi_h(), put_hevc_qpel_bi_hv(), put_hevc_qpel_bi_v(), put_hevc_qpel_bi_w_h(), put_hevc_qpel_bi_w_hv(), and put_hevc_qpel_bi_w_v().
Definition at line 624 of file dsp_template.c.
Referenced by put_hevc_epel_bi_h(), put_hevc_epel_bi_hv(), put_hevc_epel_bi_v(), put_hevc_epel_bi_w_h(), put_hevc_epel_bi_w_hv(), and put_hevc_epel_bi_w_v().
| #define P3 pix[-4 * xstride] |
Definition at line 813 of file dsp_template.c.
Referenced by do_decode(), hevc_loop_filter_luma(), loop_filter_chroma_strong(), loop_filter_luma_large(), loop_filter_luma_strong(), nvenc_map_preset(), randomize_luma_buffers(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
| #define P2 pix[-3 * xstride] |
Definition at line 814 of file dsp_template.c.
| #define P1 pix[-2 * xstride] |
Definition at line 815 of file dsp_template.c.
| #define P0 pix[-1 * xstride] |
Definition at line 816 of file dsp_template.c.
| #define Q0 pix[0 * xstride] |
Definition at line 817 of file dsp_template.c.
| #define Q1 pix[1 * xstride] |
Definition at line 818 of file dsp_template.c.
| #define Q2 pix[2 * xstride] |
Definition at line 819 of file dsp_template.c.
| #define Q3 pix[3 * xstride] |
Definition at line 820 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), loop_filter_chroma_strong(), loop_filter_chroma_strong_one_side(), loop_filter_luma_large(), loop_filter_luma_strong(), randomize_luma_buffers(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
| #define TP3 pix[-4 * xstride + 3 * ystride] |
Definition at line 823 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
| #define TP2 pix[-3 * xstride + 3 * ystride] |
Definition at line 824 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
| #define TP1 pix[-2 * xstride + 3 * ystride] |
Definition at line 825 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
| #define TP0 pix[-1 * xstride + 3 * ystride] |
Definition at line 826 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), vvc_loop_filter_luma(), and vvc_loop_ladf_level().
| #define TQ0 pix[0 * xstride + 3 * ystride] |
Definition at line 827 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), vvc_loop_filter_luma(), and vvc_loop_ladf_level().
| #define TQ1 pix[1 * xstride + 3 * ystride] |
Definition at line 828 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
| #define TQ2 pix[2 * xstride + 3 * ystride] |
Definition at line 829 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
| #define TQ3 pix[3 * xstride + 3 * ystride] |
Definition at line 830 of file dsp_template.c.
Referenced by hevc_loop_filter_luma(), vvc_loop_filter_chroma(), and vvc_loop_filter_luma().
|
static |
Definition at line 31 of file dsp_template.c.
Referenced by put_pcm().
|
static |
Definition at line 46 of file dsp_template.c.
Referenced by add_residual(), add_residual(), add_residual16x16(), add_residual32x32(), add_residual4x4(), add_residual8x8(), and ff_vvc_itx_dsp_init().
|
static |
Definition at line 61 of file dsp_template.c.
Referenced by add_residual4x4().
|
static |
Definition at line 67 of file dsp_template.c.
Referenced by add_residual8x8().
|
static |
Definition at line 73 of file dsp_template.c.
Referenced by add_residual16x16().
|
static |
Definition at line 79 of file dsp_template.c.
Referenced by add_residual32x32().
|
static |
Definition at line 85 of file dsp_template.c.
Referenced by transform_rdpcm().
|
static |
HEVC transform dequantization (ITU-T H.265 8.6.3)
| coeffs | transform coefficient buffer (in-place) |
| log2_size | log2 of transform block size, range: 2..5 (4x4 to 32x32) This value comes from recursive split_transform_flag parsing in the bitstream, bounded by log2_min_tb_size (min 2) and log2_max_trafo_size (max 5) from SPS. |
Formula: shift = 15 - BIT_DEPTH - log2_size
bit_depth | 4x4 (2) | 8x8 (3) | 16x16 (4) | 32x32 (5) -------—+------—+------—+--------—+-------— 8-bit | 5 | 4 | 3 | 2 (shift right) 10-bit | 3 | 2 | 1 | 0 (shift right / no-op) 12-bit | 1 | 0 | -1 | -2 (shift right / no-op / shift left)
When shift == 0, output equals input (identity transform), so we skip the loop entirely for better performance.
Definition at line 127 of file dsp_template.c.
|
static |
Definition at line 170 of file dsp_template.c.
Referenced by transform_4x4_luma().
|
static |
Definition at line 368 of file dsp_template.c.
Referenced by put_hevc_pel_bi_pixels().
|
static |
Definition at line 394 of file dsp_template.c.
Referenced by put_hevc_pel_bi_w_pixels().
|
static |
Definition at line 432 of file dsp_template.c.
Referenced by put_hevc_qpel_bi_h().
|
static |
Definition at line 460 of file dsp_template.c.
Referenced by put_hevc_qpel_bi_v().
|
static |
Definition at line 488 of file dsp_template.c.
Referenced by put_hevc_qpel_bi_hv().
|
static |
Definition at line 528 of file dsp_template.c.
Referenced by put_hevc_qpel_bi_w_h().
|
static |
Definition at line 555 of file dsp_template.c.
Referenced by put_hevc_qpel_bi_w_v().
|
static |
Definition at line 582 of file dsp_template.c.
Referenced by put_hevc_qpel_bi_w_hv().
|
static |
Definition at line 630 of file dsp_template.c.
Referenced by put_hevc_epel_bi_h().
|
static |
Definition at line 657 of file dsp_template.c.
Referenced by put_hevc_epel_bi_v().
|
static |
Definition at line 683 of file dsp_template.c.
Referenced by put_hevc_epel_bi_hv().
|
static |
Definition at line 723 of file dsp_template.c.
Referenced by put_hevc_epel_bi_w_h().
|
static |
Definition at line 748 of file dsp_template.c.
Referenced by put_hevc_epel_bi_w_v().
|
static |
Definition at line 773 of file dsp_template.c.
Referenced by put_hevc_epel_bi_w_hv().
|
static |
Definition at line 834 of file dsp_template.c.
Referenced by hevc_h_loop_filter_luma(), hevc_loop_filter_luma(), and hevc_v_loop_filter_luma().
|
static |
Definition at line 879 of file dsp_template.c.
Referenced by hevc_h_loop_filter_chroma(), hevc_loop_filter_chroma(), and hevc_v_loop_filter_chroma().
|
static |
Definition at line 900 of file dsp_template.c.
Referenced by hevc_h_loop_filter_chroma().
|
static |
Definition at line 907 of file dsp_template.c.
Referenced by hevc_v_loop_filter_chroma().
|
static |
Definition at line 914 of file dsp_template.c.
Referenced by hevc_h_loop_filter_luma().
|
static |
Definition at line 922 of file dsp_template.c.
Referenced by hevc_v_loop_filter_luma().