xine-lib: xine-lib-1.2.12/src/video_dec/libvdpau/vdec_hw_h264.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
vdec_hw_h264.c File Reference
`#include <stdio.h>`
`#include <stdarg.h>`
`#include "vdec_hw_h264.h"`
`#include "vdec_hw_bits_reader.h"`

## Data Structures
struct | vdec_hw_h264_vui_t
struct | vdec_hw_h264_sps_t
struct | vdec_hw_h264_pps_t
struct | vdec_hw_h264_lps_t
struct | vdec_hw_h264_frame_int_s
struct | vdec_hw_h264_sequence_t
struct | vdec_hw_h264_s

## Macros
#define | LOG_MODULE "vdec_hw_h264"
#define | lprintf(_fmt, ...) /* nothing */
#define | PICTURE_TOP_DONE 1
#define | PICTURE_BOTTOM_DONE 2
#define | PICTURE_DONE 3
#define | SHORT_TERM_REF 1
#define | LONG_TERM_REF 2
#define | MAX_SPS 32
#define | MAX_PPS 256
#define | MAX_SLICES 80 /* 68? */
#define | MAX_REF_FRAMES 16
#define | MIN_BUFFER_SIZE 10000
#define | MAX_BUFFER_SIZE 3145728
#define | BUF_PAD 8
#define | NAL_UNSPECIFIED 0
#define | NAL_SLICE_NO_IDR 1
#define | NAL_SLICE_IDR 5
#define | NAL_SEI 6
#define | NAL_SEQUENCE 7
#define | NAL_PICTURE 8
#define | NAL_SEEK_POINT 9
#define | NAL_END_SEQUENCE 10
#define | NAL_END_STREAM 11
#define | NAL_FILLER 12
#define | NAL_SEQUENCE_EXT 13
#define | SLICE_TYPE_P 0
#define | SLICE_TYPE_B 1
#define | SLICE_TYPE_I 2
#define | SLICE_TYPE_SP 3
#define | SLICE_TYPE_SI 4
#define | START_IDR_FLAG 1000
#define | MAX_POC 2147483647
#define | DPB_DRAW_CLEAR 1
#define | DPB_DRAW_REFS 2
#define | DPB_DRAW_CURRENT 3
#define | VDEC_HW_H264_MAX_SLICE_GROUPS 80

## Typedefs
typedef struct vdec_hw_h264_frame_int_s | vdec_hw_h264_frame_int_t

## Functions
static | __attribute__ ((format(printf, 3, 4)))
static uint32_t | _vdec_hw_h264_unescape (uint8_t *b, uint32_t len)
static void | _vdec_hw_h264_frame_free (vdec_hw_h264_t *vdec, vdec_hw_h264_frame_int_t *frame, int zero)
static void | _vdec_hw_h264_frame_new (vdec_hw_h264_t *vdec, vdec_hw_h264_frame_int_t *frame)
static void | _vdec_hw_h264_frame_link (vdec_hw_h264_t *vdec, vdec_hw_h264_frame_int_t *frame, vdec_hw_h264_frame_int_t *to)
static void | _vdec_hw_h264_frame_draw (vdec_hw_h264_t *vdec, vdec_hw_h264_frame_int_t *frame)
int | vdec_hw_h264_zero_pts (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_dpb_reset (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_dpb_remove (vdec_hw_h264_t *vdec, uint32_t index)
static vdec_hw_h264_frame_int_t * | _vdec_hw_h264_dpb_get_prev_ref (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_dpb_draw_frames (vdec_hw_h264_t *vdec, int32_t curpoc, int draw_mode)
static vdec_hw_h264_frame_int_t * | _vdec_hw_h264_dpb_get_PicNum (vdec_hw_h264_t *vdec, int32_t pic_num, int *index)
static void | _vdec_hw_h264_dpb_mmc1 (vdec_hw_h264_t *vdec, int32_t picnum)
static vdec_hw_h264_sps_t * | _vdec_hw_h264_get_sps (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_dbp_append (vdec_hw_h264_t *vdec, int second_field)
static void | _vdec_hw_h264_reset_slices (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_reset_sequence (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_set_ratio (vdec_hw_h264_t *vdec, vdec_hw_h264_sps_t *sps)
static void | parse_scaling_list (bits_reader_t *br, uint8_t *scaling_list, int len, int index)
static void | _vdec_hw_h264_scaling_list_fallback_A (uint8_t *scaling_lists_4x4, uint8_t *scaling_lists_8x8, int i)
static void | _vdec_hw_h264_scaling_list_fallback_B (vdec_hw_h264_sps_t *sps, vdec_hw_h264_pps_t *pps, int i)
static void | _vdec_hw_h264_read_vui (vdec_hw_h264_t *vdec, vdec_hw_h264_vui_t *vui)
static vdec_hw_h264_sps_t * | _vdec_hw_h264_read_sps (vdec_hw_h264_t *vdec)
static vdec_hw_h264_pps_t * | _vdec_hw_h264_read_pps (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_pred_weight_table (vdec_hw_h264_t *vdec, uint32_t slice_type, uint32_t ChromaArrayType, uint32_t l0, uint32_t l1)
static void | _vdec_hw_h264_ref_pic_list_reordering (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_dec_ref_pic_marking (vdec_hw_h264_t *vdec, uint8_t idr)
static void | _vdec_hw_h264_slice_header (vdec_hw_h264_t *vdec, uint8_t nal_ref_idc, uint8_t nal_unit_type)
static void | _vdec_hw_h264_slice_header_post (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_decode_poc (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_decode_picnum (vdec_hw_h264_t *vdec)
static int | _vdec_hw_h264_check_ref_list (vdec_hw_h264_t *vdec)
static void | _vdec_hw_h264_render (vdec_hw_h264_t *vdec, int bad_frame)
static void | _vdec_hw_h264_decode_picture (vdec_hw_h264_t *vdec)
static int | _vdec_hw_h264_flush_slices (vdec_hw_h264_t *vdec, uint32_t new_type)
static int | _vdec_hw_h264_nal_unit (vdec_hw_h264_t *vdec, uint8_t *buf, uint32_t len)
int | vdec_hw_h264_put_config (vdec_hw_h264_t *vdec, const uint8_t *bitstream, uint32_t num_bytes)
static void | _vdec_hw_h264_flush_buffer (vdec_hw_h264_t *vdec)
int | vdec_hw_h264_put_frame (vdec_hw_h264_t *vdec, int64_t pts, const uint8_t *bitstream, uint32_t num_bytes, int frame_end)
int | vdec_hw_h264_flush (vdec_hw_h264_t *vdec)
vdec_hw_h264_t * | vdec_hw_h264_new (int(*logg)(void *user_data, vdec_hw_h264_logg_t level, const char *fmt,...), void *user_data, int(*frame_new)(void *user_data, vdec_hw_h264_frame_t *frame), int(*frame_render)(void *user_data, vdec_hw_h264_frame_t *frame), int(*frame_ready)(void *user_data, vdec_hw_h264_frame_t *frame), void(*frame_delete)(void *user_data, vdec_hw_h264_frame_t *frame), int num_frames)
int | vdec_hw_h264_reset (vdec_hw_h264_t *vdec)
int | vdec_hw_h264_put_container_info (vdec_hw_h264_t *vdec, int width, int height, int duration, double ratio)
void | vdec_hw_h264_delete (vdec_hw_h264_t **dec)

## Variables
static const uint8_t | zigzag_4x4 [16]
static const uint8_t | zigzag_8x8 [64]
static const uint8_t | default_4x4_intra [16]
static const uint8_t | default_4x4_inter [16]
static const uint8_t | default_8x8_intra [64]
static const uint8_t | default_8x8_inter [64]

## Macro Definition Documentation

## ◆ BUF_PAD

#define BUF_PAD 8

## ◆ DPB_DRAW_CLEAR

#define DPB_DRAW_CLEAR 1

## ◆ DPB_DRAW_CURRENT

#define DPB_DRAW_CURRENT 3

## ◆ DPB_DRAW_REFS

#define DPB_DRAW_REFS 2

## ◆ LOG_MODULE

#define LOG_MODULE "vdec_hw_h264"

## ◆ LONG_TERM_REF

#define LONG_TERM_REF 2

## ◆ lprintf

#define lprintf | ( |  | _fmt,
|  |  | ...
| ) |  | /* nothing */

## ◆ MAX_BUFFER_SIZE

#define MAX_BUFFER_SIZE 3145728

## ◆ MAX_POC

#define MAX_POC 2147483647

## ◆ MAX_PPS

#define MAX_PPS 256

## ◆ MAX_REF_FRAMES

#define MAX_REF_FRAMES 16

## ◆ MAX_SLICES

#define MAX_SLICES 80 /* 68? */

## ◆ MAX_SPS

#define MAX_SPS 32

## ◆ MIN_BUFFER_SIZE

#define MIN_BUFFER_SIZE 10000

## ◆ NAL_END_SEQUENCE

#define NAL_END_SEQUENCE 10

## ◆ NAL_END_STREAM

#define NAL_END_STREAM 11

## ◆ NAL_FILLER

#define NAL_FILLER 12

## ◆ NAL_PICTURE

#define NAL_PICTURE 8

## ◆ NAL_SEEK_POINT

#define NAL_SEEK_POINT 9

## ◆ NAL_SEI

#define NAL_SEI 6

## ◆ NAL_SEQUENCE

#define NAL_SEQUENCE 7

## ◆ NAL_SEQUENCE_EXT

#define NAL_SEQUENCE_EXT 13

## ◆ NAL_SLICE_IDR

#define NAL_SLICE_IDR 5

## ◆ NAL_SLICE_NO_IDR

#define NAL_SLICE_NO_IDR 1

## ◆ NAL_UNSPECIFIED

#define NAL_UNSPECIFIED 0

## ◆ PICTURE_BOTTOM_DONE

#define PICTURE_BOTTOM_DONE 2

## ◆ PICTURE_DONE

#define PICTURE_DONE 3

## ◆ PICTURE_TOP_DONE

#define PICTURE_TOP_DONE 1

## ◆ SHORT_TERM_REF

#define SHORT_TERM_REF 1

## ◆ SLICE_TYPE_B

#define SLICE_TYPE_B 1

## ◆ SLICE_TYPE_I

#define SLICE_TYPE_I 2

## ◆ SLICE_TYPE_P

#define SLICE_TYPE_P 0

## ◆ SLICE_TYPE_SI

#define SLICE_TYPE_SI 4

## ◆ SLICE_TYPE_SP

#define SLICE_TYPE_SP 3

## ◆ START_IDR_FLAG

#define START_IDR_FLAG 1000

## ◆ VDEC_HW_H264_MAX_SLICE_GROUPS

#define VDEC_HW_H264_MAX_SLICE_GROUPS 80

## Typedef Documentation

## ◆ vdec_hw_h264_frame_int_t

typedef struct vdec_hw_h264_frame_int_s vdec_hw_h264_frame_int_t

## Function Documentation

## ◆ __attribute__()

static __attribute__ | ( | (format(printf, 3, 4)) |  | ) |
| static

References user_data(), and VDEC_HW_H264_LOGG_ERR.

## ◆ _vdec_hw_h264_check_ref_list()

static int _vdec_hw_h264_check_ref_list | ( | vdec_hw_h264_t * | vdec | ) |
| static

References vdec_hw_h264_frame_t::bad_frame, vdec_hw_h264_frame_int_s::BottomFieldOrderCnt, vdec_hw_h264_frame_int_s::f, vdec_hw_h264_lps_t::field_pic_flag, vdec_hw_h264_frame_int_s::field_pic_flag, vdec_hw_h264_s::frames, vdec_hw_h264_frame_int_s::is_reference, LOG_MODULE, MAX_REF_FRAMES, vdec_hw_h264_lps_t::num_ref_idx_l0_active_minus1, vdec_hw_h264_lps_t::num_ref_idx_l1_active_minus1, vdec_hw_h264_lps_t::pps_id, vdec_hw_h264_sps_t::ref_frames_used, vdec_hw_h264_s::ref_frames_used, vdec_hw_h264_lps_t::slice_type, SLICE_TYPE_B, SLICE_TYPE_I, vdec_hw_h264_pps_t::sps_id, vdec_hw_h264_frame_int_s::TopFieldOrderCnt, and VDEC_HW_H264_LOGG_ERR.

Referenced by _vdec_hw_h264_decode_picture().

## ◆ _vdec_hw_h264_dbp_append()

static void _vdec_hw_h264_dbp_append | ( | vdec_hw_h264_t * | vdec,
|  | int | second_field
| ) |  |
| static

References _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_dpb_get_prev_ref(), _vdec_hw_h264_dpb_remove(), _vdec_hw_h264_frame_link(), _vdec_hw_h264_get_sps(), vdec_hw_h264_frame_int_s::BottomFieldOrderCnt, DPB_DRAW_REFS, vdec_hw_h264_frame_int_s::drawn, vdec_hw_h264_s::frames, vdec_hw_h264_frame_int_s::is_reference, LOG_MODULE, lprintf, MAX_POC, MAX_REF_FRAMES, NULL, vdec_hw_h264_s::ref_frames_max, vdec_hw_h264_sps_t::ref_frames_used, vdec_hw_h264_s::ref_frames_used, vdec_hw_h264_sps_t::sps_id, vdec_hw_h264_frame_int_s::TopFieldOrderCnt, VDEC_HW_H264_LOGG_ERR, and VDEC_HW_H264_LOGG_INFO.

Referenced by _vdec_hw_h264_decode_picture().

## ◆ _vdec_hw_h264_dec_ref_pic_marking()

static void _vdec_hw_h264_dec_ref_pic_marking | ( | vdec_hw_h264_t * | vdec,
|  | uint8_t | idr
| ) |  |
| static

References _vdec_hw_h264_dpb_mmc1(), bits_exp_ue(), bits_read(), bits_skip(), vdec_hw_h264_frame_int_s::completed, vdec_hw_h264_frame_int_s::field_pic_flag, vdec_hw_h264_s::frames, vdec_hw_h264_frame_int_s::is_reference, lprintf, MAX_REF_FRAMES, vdec_hw_h264_frame_int_s::PicNum, PICTURE_DONE, and SHORT_TERM_REF.

Referenced by _vdec_hw_h264_slice_header_post().

## ◆ _vdec_hw_h264_decode_picnum()

static void _vdec_hw_h264_decode_picnum | ( | vdec_hw_h264_t * | vdec | ) |
| static

References vdec_hw_h264_lps_t::bottom_field_flag, vdec_hw_h264_lps_t::field_pic_flag, vdec_hw_h264_frame_int_s::field_pic_flag, vdec_hw_h264_frame_int_s::FrameNum, vdec_hw_h264_frame_int_s::FrameNumWrap, vdec_hw_h264_s::frames, MAX_REF_FRAMES, vdec_hw_h264_lps_t::MaxFrameNum, vdec_hw_h264_frame_int_s::PicNum, and vdec_hw_h264_s::ref_frames_used.

Referenced by _vdec_hw_h264_decode_picture().

## ◆ _vdec_hw_h264_decode_picture()

static void _vdec_hw_h264_decode_picture | ( | vdec_hw_h264_t * | vdec | ) |
| static

References _vdec_hw_h264_check_ref_list(), _vdec_hw_h264_dbp_append(), _vdec_hw_h264_decode_picnum(), _vdec_hw_h264_decode_poc(), _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_dpb_reset(), _vdec_hw_h264_frame_free(), _vdec_hw_h264_ref_pic_list_reordering(), _vdec_hw_h264_render(), _vdec_hw_h264_slice_header_post(), vdec_hw_h264_lps_t::bottom_field_flag, vdec_hw_h264_frame_int_s::BottomFieldOrderCnt, vdec_hw_h264_frame_int_s::completed, DPB_DRAW_CLEAR, DPB_DRAW_CURRENT, DPB_DRAW_REFS, vdec_hw_h264_lps_t::field_pic_flag, vdec_hw_h264_frame_int_s::field_pic_flag, vdec_hw_h264_lps_t::frame_num, vdec_hw_h264_frame_int_s::FrameNum, vdec_hw_h264_s::frames, vdec_hw_h264_frame_int_s::is_reference, lprintf, MAX_POC, MAX_REF_FRAMES, vdec_hw_h264_frame_int_s::missing_header, vdec_hw_h264_lps_t::nal_unit_type, PICTURE_BOTTOM_DONE, PICTURE_DONE, PICTURE_TOP_DONE, vdec_hw_h264_lps_t::pps_id, START_IDR_FLAG, and vdec_hw_h264_frame_int_s::TopFieldOrderCnt.

Referenced by _vdec_hw_h264_flush_slices().

## ◆ _vdec_hw_h264_decode_poc()

static void _vdec_hw_h264_decode_poc | ( | vdec_hw_h264_t * | vdec | ) |
| static

References _vdec_hw_h264_dpb_get_prev_ref(), vdec_hw_h264_lps_t::bottom_field_flag, vdec_hw_h264_frame_int_s::BottomFieldOrderCnt, vdec_hw_h264_frame_int_s::completed, vdec_hw_h264_lps_t::delta_pic_order_cnt, vdec_hw_h264_lps_t::delta_pic_order_cnt_bottom, vdec_hw_h264_frame_int_s::f, vdec_hw_h264_lps_t::field_pic_flag, vdec_hw_h264_frame_int_s::field_pic_flag, vdec_hw_h264_lps_t::frame_num, vdec_hw_h264_frame_int_s::FrameNum, vdec_hw_h264_s::frames, vdec_hw_h264_frame_int_s::is_reference, vdec_hw_h264_sps_t::log2_max_frame_num_minus4, vdec_hw_h264_sps_t::log2_max_pic_order_cnt_lsb_minus4, MAX_REF_FRAMES, vdec_hw_h264_frame_int_s::mmc5, vdec_hw_h264_lps_t::nal_ref_idc, NAL_SLICE_IDR, vdec_hw_h264_lps_t::nal_unit_type, vdec_hw_h264_sps_t::offset_for_non_ref_pic, vdec_hw_h264_sps_t::offset_for_ref_frame, vdec_hw_h264_sps_t::offset_for_top_to_bottom_field, vdec_hw_h264_lps_t::pic_order_cnt_lsb, vdec_hw_h264_frame_int_s::pic_order_cnt_lsb, vdec_hw_h264_sps_t::pic_order_cnt_type, vdec_hw_h264_frame_int_s::PicOrderCntMsb, PICTURE_BOTTOM_DONE, PICTURE_DONE, PICTURE_TOP_DONE, vdec_hw_h264_lps_t::pps_id, vdec_hw_h264_sps_t::ref_frames_used_in_pic_order_cnt_cycle, vdec_hw_h264_pps_t::sps_id, vdec_hw_h264_frame_t::top_field_first, vdec_hw_h264_frame_int_s::TopFieldOrderCnt, and vdec_hw_h264_frame_int_s::used.

Referenced by _vdec_hw_h264_decode_picture().

## ◆ _vdec_hw_h264_dpb_draw_frames()

static void _vdec_hw_h264_dpb_draw_frames | ( | vdec_hw_h264_t * | vdec,
|  | int32_t | curpoc,
|  | int | draw_mode
| ) |  |
| static

References _vdec_hw_h264_dpb_remove(), _vdec_hw_h264_dpb_reset(), _vdec_hw_h264_frame_draw(), _vdec_hw_h264_frame_free(), vdec_hw_h264_frame_int_s::BottomFieldOrderCnt, DPB_DRAW_CLEAR, DPB_DRAW_CURRENT, vdec_hw_h264_frame_int_s::drawn, vdec_hw_h264_s::frames, vdec_hw_h264_frame_int_s::is_reference, MAX_REF_FRAMES, vdec_hw_h264_s::ref_frames_used, and vdec_hw_h264_frame_int_s::TopFieldOrderCnt.

Referenced by _vdec_hw_h264_dbp_append(), _vdec_hw_h264_decode_picture(), _vdec_hw_h264_dpb_mmc1(), _vdec_hw_h264_nal_unit(), vdec_hw_h264_flush(), and vdec_hw_h264_put_frame().

## ◆ _vdec_hw_h264_dpb_get_PicNum()

static vdec_hw_h264_frame_int_t * _vdec_hw_h264_dpb_get_PicNum | ( | vdec_hw_h264_t * | vdec,
|  | int32_t | pic_num,
|  | int * | index
| ) |  |
| static

References NULL, vdec_hw_h264_frame_int_s::PicNum, and vdec_hw_h264_s::ref_frames_used.

Referenced by _vdec_hw_h264_dpb_mmc1().

## ◆ _vdec_hw_h264_dpb_get_prev_ref()

static vdec_hw_h264_frame_int_t * _vdec_hw_h264_dpb_get_prev_ref | ( | vdec_hw_h264_t * | vdec | ) |
| static

References NULL, and vdec_hw_h264_s::ref_frames_used.

Referenced by _vdec_hw_h264_dbp_append(), and _vdec_hw_h264_decode_poc().

## ◆ _vdec_hw_h264_dpb_mmc1()

static void _vdec_hw_h264_dpb_mmc1 | ( | vdec_hw_h264_t * | vdec,
|  | int32_t | picnum
| ) |  |
| static

References _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_dpb_get_PicNum(), _vdec_hw_h264_dpb_remove(), vdec_hw_h264_frame_int_s::BottomFieldOrderCnt, DPB_DRAW_REFS, vdec_hw_h264_frame_int_s::drawn, vdec_hw_h264_frame_int_s::is_reference, lprintf, and vdec_hw_h264_frame_int_s::TopFieldOrderCnt.

Referenced by _vdec_hw_h264_dec_ref_pic_marking().

## ◆ _vdec_hw_h264_dpb_remove()

static void _vdec_hw_h264_dpb_remove | ( | vdec_hw_h264_t * | vdec,
|  | uint32_t | index
| ) |  |
| static

References _vdec_hw_h264_frame_free(), lprintf, and vdec_hw_h264_s::ref_frames_used.

Referenced by _vdec_hw_h264_dbp_append(), _vdec_hw_h264_dpb_draw_frames(), and _vdec_hw_h264_dpb_mmc1().

## ◆ _vdec_hw_h264_dpb_reset()

static void _vdec_hw_h264_dpb_reset | ( | vdec_hw_h264_t * | vdec | ) |
| static

References _vdec_hw_h264_frame_free(), vdec_hw_h264_s::frames, vdec_hw_h264_frame_int_s::is_reference, MAX_REF_FRAMES, and vdec_hw_h264_s::ref_frames_used.

Referenced by _vdec_hw_h264_decode_picture(), _vdec_hw_h264_dpb_draw_frames(), and _vdec_hw_h264_reset_sequence().

## ◆ _vdec_hw_h264_flush_buffer()

static void _vdec_hw_h264_flush_buffer | ( | vdec_hw_h264_t * | vdec | ) |
| static

Referenced by vdec_hw_h264_put_frame().

## ◆ _vdec_hw_h264_flush_slices()

static int _vdec_hw_h264_flush_slices | ( | vdec_hw_h264_t * | vdec,
|  | uint32_t | new_type
| ) |  |
| static

References _vdec_hw_h264_decode_picture(), and MAX_SLICES.

Referenced by _vdec_hw_h264_nal_unit(), vdec_hw_h264_flush(), and vdec_hw_h264_put_frame().

## ◆ _vdec_hw_h264_frame_draw()

static void _vdec_hw_h264_frame_draw | ( | vdec_hw_h264_t * | vdec,
|  | vdec_hw_h264_frame_int_t * | frame
| ) |  |
| static

References vdec_hw_h264_frame_int_s::drawn, vdec_hw_h264_frame_int_s::f, vdec_hw_h264_frame_int_s::link, and vdec_hw_h264_s::stats.

Referenced by _vdec_hw_h264_dpb_draw_frames().

## ◆ _vdec_hw_h264_frame_free()

static void _vdec_hw_h264_frame_free | ( | vdec_hw_h264_t * | vdec,
|  | vdec_hw_h264_frame_int_t * | frame,
|  | int | zero
| ) |  |
| static

References vdec_hw_h264_frame_int_s::f, vdec_hw_h264_frame_int_s::link, LOG_MODULE, NULL, vdec_hw_h264_frame_t::user_data, vdec_hw_h264_s::user_frames, vdec_hw_h264_frame_t::vdec, and VDEC_HW_H264_LOGG_ERR.

Referenced by _vdec_hw_h264_decode_picture(), _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_dpb_remove(), _vdec_hw_h264_dpb_reset(), _vdec_hw_h264_frame_link(), _vdec_hw_h264_frame_new(), _vdec_hw_h264_reset_sequence(), and vdec_hw_h264_delete().

## ◆ _vdec_hw_h264_frame_link()

static void _vdec_hw_h264_frame_link | ( | vdec_hw_h264_t * | vdec,
|  | vdec_hw_h264_frame_int_t * | frame,
|  | vdec_hw_h264_frame_int_t * | to
| ) |  |
| static

References _vdec_hw_h264_frame_free(), vdec_hw_h264_frame_int_s::f, vdec_hw_h264_frame_int_s::link, and vdec_hw_h264_frame_t::user_data.

Referenced by _vdec_hw_h264_dbp_append().

## ◆ _vdec_hw_h264_frame_new()

static void _vdec_hw_h264_frame_new | ( | vdec_hw_h264_t * | vdec,
|  | vdec_hw_h264_frame_int_t * | frame
| ) |  |
| static

References _vdec_hw_h264_frame_free(), vdec_hw_h264_frame_int_s::drawn, vdec_hw_h264_frame_int_s::f, vdec_hw_h264_frame_int_s::link, LOG_MODULE, NULL, vdec_hw_h264_s::ref_frames_max, vdec_hw_h264_frame_t::user_data, vdec_hw_h264_s::user_frames, and VDEC_HW_H264_LOGG_ERR.

Referenced by _vdec_hw_h264_render().

## ◆ _vdec_hw_h264_get_sps()

static vdec_hw_h264_sps_t * _vdec_hw_h264_get_sps | ( | vdec_hw_h264_t * | vdec | ) |
| static

References NULL, vdec_hw_h264_lps_t::pps_id, and vdec_hw_h264_pps_t::sps_id.

Referenced by _vdec_hw_h264_dbp_append(), and _vdec_hw_h264_nal_unit().

## ◆ _vdec_hw_h264_nal_unit()

static int _vdec_hw_h264_nal_unit | ( | vdec_hw_h264_t * | vdec,
|  | uint8_t * | buf,
|  | uint32_t | len
| ) |  |
| static

References _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_flush_slices(), _vdec_hw_h264_get_sps(), _vdec_hw_h264_read_pps(), _vdec_hw_h264_read_sps(), _vdec_hw_h264_slice_header(), _vdec_hw_h264_unescape(), bits_set_buf(), DPB_DRAW_CLEAR, LOG_MODULE, lprintf, MAX_POC, NAL_END_SEQUENCE, NAL_FILLER, NAL_PICTURE, NAL_SEEK_POINT, NAL_SEI, NAL_SEQUENCE, NAL_SLICE_IDR, NAL_SLICE_NO_IDR, vdec_hw_h264_sps_t::reused, vdec_hw_h264_s::stats, vdec_hw_h264_s::tempbuf, VDEC_HW_H264_FRAME_NEW_SEQ, VDEC_HW_H264_LOGG_ERR, and VDEC_HW_H264_LOGG_INFO.

Referenced by vdec_hw_h264_flush(), and vdec_hw_h264_put_frame().

## ◆ _vdec_hw_h264_pred_weight_table()

static void _vdec_hw_h264_pred_weight_table | ( | vdec_hw_h264_t * | vdec,
|  | uint32_t | slice_type,
|  | uint32_t | ChromaArrayType,
|  | uint32_t | l0,
|  | uint32_t | l1
| ) |  |
| static

References bits_exp_se(), bits_exp_ue(), bits_read(), slice_type(), and SLICE_TYPE_B.

Referenced by _vdec_hw_h264_slice_header_post().

## ◆ _vdec_hw_h264_read_pps()

static vdec_hw_h264_pps_t * _vdec_hw_h264_read_pps | ( | vdec_hw_h264_t * | vdec | ) |
| static

References _vdec_hw_h264_scaling_list_fallback_A(), _vdec_hw_h264_scaling_list_fallback_B(), bits, bits_exp_se(), bits_exp_ue(), bits_read(), bits_valid_left(), vdec_hw_h264_pps_t::chroma_qp_index_offset, vdec_hw_h264_pps_t::constrained_intra_pred_flag, vdec_hw_h264_pps_t::deblocking_filter_control_present_flag, vdec_hw_h264_pps_t::entropy_coding_mode_flag, vdec_hw_h264_pps_t::id, LOG_MODULE, lprintf, NULL, vdec_hw_h264_pps_t::num_ref_idx_l0_active_minus1, vdec_hw_h264_pps_t::num_ref_idx_l1_active_minus1, vdec_hw_h264_pps_t::num_slice_groups_minus1, parse_scaling_list(), vdec_hw_h264_pps_t::pic_init_qp_minus26, vdec_hw_h264_pps_t::pic_init_qs_minus26, vdec_hw_h264_pps_t::pic_order_present_flag, vdec_hw_h264_pps_t::pic_scaling_list_present_flag, vdec_hw_h264_pps_t::pic_scaling_matrix_present_flag, vdec_hw_h264_pps_t::pic_size_in_map_units_minus1, vdec_hw_h264_pps_t::pps_id, vdec_hw_h264_pps_t::redundant_pic_cnt_present_flag, vdec_hw_h264_pps_t::run_length_minus1, vdec_hw_h264_pps_t::scaling_lists_4x4, vdec_hw_h264_pps_t::scaling_lists_8x8, vdec_hw_h264_pps_t::second_chroma_qp_index_offset, vdec_hw_h264_sps_t::seq_scaling_matrix_present_flag, vdec_hw_h264_pps_t::slice_group_change_direction_flag, vdec_hw_h264_pps_t::slice_group_change_rate_minus1, vdec_hw_h264_pps_t::slice_group_map_type, vdec_hw_h264_pps_t::slice_groups, vdec_hw_h264_pps_t::sps_id, vdec_hw_h264_s::stats, vdec_hw_h264_pps_t::transform_8x8_mode_flag, VDEC_HW_H264_LOGG_ERR, VDEC_HW_H264_LOGG_INFO, VDEC_HW_H264_MAX_SLICE_GROUPS, vdec_hw_h264_pps_t::weighted_bipred_idc, and vdec_hw_h264_pps_t::weighted_pred_flag.

Referenced by _vdec_hw_h264_nal_unit(), and vdec_hw_h264_put_config().

## ◆ _vdec_hw_h264_read_sps()

static vdec_hw_h264_sps_t * _vdec_hw_h264_read_sps | ( | vdec_hw_h264_t * | vdec | ) |
| static

References _vdec_hw_h264_read_vui(), _vdec_hw_h264_scaling_list_fallback_A(), _vdec_hw_h264_set_ratio(), vdec_hw_h264_sps_t::bit_depth_chroma_minus8, vdec_hw_h264_sps_t::bit_depth_luma_minus8, bits, bits_exp_se(), bits_exp_ue(), bits_read(), vdec_hw_h264_sps_t::chroma_format_idc, vdec_hw_h264_sps_t::constraint_set0_flag, vdec_hw_h264_sps_t::constraint_set1_flag, vdec_hw_h264_sps_t::constraint_set2_flag, vdec_hw_h264_sps_t::constraint_set3_flag, vdec_hw_h264_sps_t::delta_pic_order_always_zero_flag, vdec_hw_h264_sps_t::direct_8x8_inference_flag, vdec_hw_h264_sps_t::frame_crop_bottom_offset, vdec_hw_h264_sps_t::frame_crop_left_offset, vdec_hw_h264_sps_t::frame_crop_right_offset, vdec_hw_h264_sps_t::frame_crop_top_offset, vdec_hw_h264_sps_t::frame_cropping_flag, vdec_hw_h264_sps_t::frame_mbs_only_flag, vdec_hw_h264_sps_t::gaps_in_frame_num_value_allowed_flag, vdec_hw_h264_sps_t::level_idc, vdec_hw_h264_sps_t::log2_max_frame_num_minus4, vdec_hw_h264_sps_t::log2_max_pic_order_cnt_lsb_minus4, LOG_MODULE, lprintf, vdec_hw_h264_sps_t::mb_adaptive_frame_field_flag, NULL, vdec_hw_h264_sps_t::offset_for_non_ref_pic, vdec_hw_h264_sps_t::offset_for_ref_frame, vdec_hw_h264_sps_t::offset_for_top_to_bottom_field, parse_scaling_list(), vdec_hw_h264_sps_t::pic_height_in_map_units_minus1, vdec_hw_h264_sps_t::pic_order_cnt_type, vdec_hw_h264_sps_t::pic_width_in_mbs_minus1, vdec_hw_h264_sps_t::profile_idc, vdec_hw_h264_sps_t::qpprime_y_zero_transform_bypass_flag, vdec_hw_h264_sps_t::ref_frames_used, vdec_hw_h264_sps_t::ref_frames_used_in_pic_order_cnt_cycle, vdec_hw_h264_sps_t::reused, vdec_hw_h264_sps_t::scaling_lists_4x4, vdec_hw_h264_sps_t::scaling_lists_8x8, vdec_hw_h264_sps_t::separate_colour_plane_flag, vdec_hw_h264_sps_t::seq_scaling_matrix_present_flag, vdec_hw_h264_sps_t::sps_id, vdec_hw_h264_s::stats, VDEC_HW_H264_LOGG_ERR, VDEC_HW_H264_LOGG_INFO, vdec_hw_h264_sps_t::vui, and vdec_hw_h264_sps_t::vui_parameters_present_flag.

Referenced by _vdec_hw_h264_nal_unit(), and vdec_hw_h264_put_config().

## ◆ _vdec_hw_h264_read_vui()

static void _vdec_hw_h264_read_vui | ( | vdec_hw_h264_t * | vdec,
|  | vdec_hw_h264_vui_t * | vui
| ) |  |
| static

References vdec_hw_h264_vui_t::aspect_ratio_idc, vdec_hw_h264_vui_t::aspect_ratio_info, bits_exp_ue(), bits_read(), bits_skip(), vdec_hw_h264_vui_t::colour_desc, lprintf, vdec_hw_h264_vui_t::num_units_in_tick, vdec_hw_h264_vui_t::sar_height, vdec_hw_h264_vui_t::sar_width, vdec_hw_h264_vui_t::time_scale, and vdec_hw_h264_vui_t::timing_info.

Referenced by _vdec_hw_h264_read_sps().

## ◆ _vdec_hw_h264_ref_pic_list_reordering()

static void _vdec_hw_h264_ref_pic_list_reordering | ( | vdec_hw_h264_t * | vdec | ) |
| static

References bits_exp_ue(), bits_read(), vdec_hw_h264_lps_t::slice_type, SLICE_TYPE_B, SLICE_TYPE_I, and SLICE_TYPE_SI.

Referenced by _vdec_hw_h264_decode_picture().

## ◆ _vdec_hw_h264_render()

static void _vdec_hw_h264_render | ( | vdec_hw_h264_t * | vdec,
|  | int | bad_frame
| ) |  |
| static

References _vdec_hw_h264_frame_new(), vdec_hw_h264_frame_t::bad_frame, vdec_hw_h264_sps_t::bit_depth_chroma_minus8, vdec_hw_h264_sps_t::bit_depth_luma_minus8, vdec_hw_h264_lps_t::bottom_field_flag, vdec_hw_h264_info_ref_frame_t::bottom_is_reference, vdec_hw_h264_frame_int_s::BottomFieldOrderCnt, vdec_hw_h264_sps_t::chroma_format_idc, vdec_hw_h264_pps_t::chroma_qp_index_offset, vdec_hw_h264_frame_t::color_matrix, vdec_hw_h264_frame_int_s::completed, vdec_hw_h264_pps_t::constrained_intra_pred_flag, vdec_hw_h264_pps_t::deblocking_filter_control_present_flag, vdec_hw_h264_sps_t::delta_pic_order_always_zero_flag, vdec_hw_h264_sps_t::direct_8x8_inference_flag, vdec_hw_h264_frame_int_s::drop_pts, vdec_hw_h264_frame_t::duration, vdec_hw_h264_pps_t::entropy_coding_mode_flag, vdec_hw_h264_frame_int_s::f, vdec_hw_h264_info_ref_frame_t::field_order_cnt, vdec_hw_h264_lps_t::field_pic_flag, vdec_hw_h264_frame_int_s::field_pic_flag, vdec_hw_h264_frame_t::flags, vdec_hw_h264_info_ref_frame_t::frame, vdec_hw_h264_info_ref_frame_t::frame_idx, vdec_hw_h264_sps_t::frame_mbs_only_flag, vdec_hw_h264_lps_t::frame_num, vdec_hw_h264_frame_int_s::FrameNum, vdec_hw_h264_s::frames, vdec_hw_h264_sps_t::gaps_in_frame_num_value_allowed_flag, vdec_hw_h264_frame_t::height, vdec_hw_h264_frame_t::info, vdec_hw_h264_info_ref_frame_t::is_long_term, vdec_hw_h264_frame_int_s::is_reference, vdec_hw_h264_frame_t::level, vdec_hw_h264_sps_t::level_idc, vdec_hw_h264_sps_t::log2_max_frame_num_minus4, vdec_hw_h264_sps_t::log2_max_pic_order_cnt_lsb_minus4, MAX_REF_FRAMES, vdec_hw_h264_sps_t::mb_adaptive_frame_field_flag, vdec_hw_h264_lps_t::nal_ref_idc, NULL, vdec_hw_h264_frame_t::num_ref_frames, vdec_hw_h264_pps_t::num_ref_idx_l0_active_minus1, vdec_hw_h264_pps_t::num_ref_idx_l1_active_minus1, vdec_hw_h264_pps_t::num_slice_groups_minus1, vdec_hw_h264_pps_t::pic_init_qp_minus26, vdec_hw_h264_pps_t::pic_init_qs_minus26, vdec_hw_h264_sps_t::pic_order_cnt_type, vdec_hw_h264_pps_t::pic_order_present_flag, vdec_hw_h264_pps_t::pic_scaling_matrix_present_flag, PICTURE_DONE, vdec_hw_h264_lps_t::pps_id, vdec_hw_h264_frame_t::profile, vdec_hw_h264_sps_t::profile_idc, vdec_hw_h264_frame_t::progressive_frame, vdec_hw_h264_frame_t::pts, vdec_hw_h264_frame_t::ratio, vdec_hw_h264_pps_t::redundant_pic_cnt_present_flag, vdec_hw_h264_sps_t::ref_frames_used, vdec_hw_h264_s::ref_frames_used, vdec_hw_h264_sps_t::scaling_lists_4x4, vdec_hw_h264_pps_t::scaling_lists_4x4, vdec_hw_h264_sps_t::scaling_lists_8x8, vdec_hw_h264_pps_t::scaling_lists_8x8, vdec_hw_h264_pps_t::second_chroma_qp_index_offset, vdec_hw_h264_sps_t::separate_colour_plane_flag, vdec_hw_h264_pps_t::slice_group_map_type, vdec_hw_h264_pps_t::sps_id, vdec_hw_h264_info_ref_frame_t::top_is_reference, vdec_hw_h264_frame_int_s::TopFieldOrderCnt, vdec_hw_h264_pps_t::transform_8x8_mode_flag, VDEC_HW_H264_FRAME_BOTTOM_FIELD, VDEC_HW_H264_FRAME_TOP_FIELD, vdec_hw_h264_pps_t::weighted_bipred_idc, vdec_hw_h264_pps_t::weighted_pred_flag, and vdec_hw_h264_frame_t::width.

Referenced by _vdec_hw_h264_decode_picture().

## ◆ _vdec_hw_h264_reset_sequence()

static void _vdec_hw_h264_reset_sequence | ( | vdec_hw_h264_t * | vdec | ) |
| static

References _vdec_hw_h264_dpb_reset(), _vdec_hw_h264_frame_free(), _vdec_hw_h264_reset_slices(), vdec_hw_h264_s::frames, MAX_REF_FRAMES, and VDEC_HW_H264_FRAME_NEW_SEQ.

Referenced by vdec_hw_h264_delete(), vdec_hw_h264_new(), and vdec_hw_h264_reset().

## ◆ _vdec_hw_h264_reset_slices()

static void _vdec_hw_h264_reset_slices | ( | vdec_hw_h264_t * | vdec | ) |
| static

Referenced by _vdec_hw_h264_reset_sequence().

## ◆ _vdec_hw_h264_scaling_list_fallback_A()

static void _vdec_hw_h264_scaling_list_fallback_A | ( | uint8_t * | scaling_lists_4x4,
|  | uint8_t * | scaling_lists_8x8,
|  | int | i
| ) |  |
| static

References default_4x4_inter, default_4x4_intra, default_8x8_inter, default_8x8_intra, zigzag_4x4, and zigzag_8x8.

Referenced by _vdec_hw_h264_read_pps(), and _vdec_hw_h264_read_sps().

## ◆ _vdec_hw_h264_scaling_list_fallback_B()

static void _vdec_hw_h264_scaling_list_fallback_B | ( | vdec_hw_h264_sps_t * | sps,
|  | vdec_hw_h264_pps_t * | pps,
|  | int | i
| ) |  |
| static

References vdec_hw_h264_sps_t::scaling_lists_4x4, vdec_hw_h264_pps_t::scaling_lists_4x4, vdec_hw_h264_sps_t::scaling_lists_8x8, and vdec_hw_h264_pps_t::scaling_lists_8x8.

Referenced by _vdec_hw_h264_read_pps().

## ◆ _vdec_hw_h264_set_ratio()

static void _vdec_hw_h264_set_ratio | ( | vdec_hw_h264_t * | vdec,
|  | vdec_hw_h264_sps_t * | sps
| ) |  |
| static

References vdec_hw_h264_vui_t::aspect_ratio_idc, vdec_hw_h264_vui_t::aspect_ratio_info, vdec_hw_h264_vui_t::sar_height, vdec_hw_h264_vui_t::sar_width, and vdec_hw_h264_sps_t::vui.

Referenced by _vdec_hw_h264_read_sps().

## ◆ _vdec_hw_h264_slice_header()

static void _vdec_hw_h264_slice_header | ( | vdec_hw_h264_t * | vdec,
|  | uint8_t | nal_ref_idc,
|  | uint8_t | nal_unit_type
| ) |  |
| static

References bits_exp_se(), bits_exp_ue(), bits_read(), bits_skip(), vdec_hw_h264_lps_t::bottom_field_flag, vdec_hw_h264_frame_int_s::completed, vdec_hw_h264_sps_t::delta_pic_order_always_zero_flag, vdec_hw_h264_lps_t::delta_pic_order_cnt, vdec_hw_h264_lps_t::delta_pic_order_cnt_bottom, vdec_hw_h264_lps_t::field_pic_flag, vdec_hw_h264_sps_t::frame_mbs_only_flag, vdec_hw_h264_lps_t::frame_num, vdec_hw_h264_s::frames, vdec_hw_h264_lps_t::idr_pic_id, vdec_hw_h264_sps_t::log2_max_frame_num_minus4, vdec_hw_h264_sps_t::log2_max_pic_order_cnt_lsb_minus4, LOG_MODULE, lprintf, MAX_REF_FRAMES, vdec_hw_h264_lps_t::MaxFrameNum, vdec_hw_h264_frame_int_s::missing_header, vdec_hw_h264_lps_t::nal_ref_idc, NAL_SLICE_IDR, vdec_hw_h264_lps_t::nal_unit_type, vdec_hw_h264_pps_t::num_ref_idx_l0_active_minus1, vdec_hw_h264_lps_t::num_ref_idx_l0_active_minus1, vdec_hw_h264_pps_t::num_ref_idx_l1_active_minus1, vdec_hw_h264_lps_t::num_ref_idx_l1_active_minus1, vdec_hw_h264_lps_t::pic_order_cnt_lsb, vdec_hw_h264_sps_t::pic_order_cnt_type, vdec_hw_h264_pps_t::pic_order_present_flag, vdec_hw_h264_lps_t::pps_id, vdec_hw_h264_lps_t::redundant_pic_cnt, vdec_hw_h264_pps_t::redundant_pic_cnt_present_flag, vdec_hw_h264_sps_t::separate_colour_plane_flag, vdec_hw_h264_lps_t::slice_type, SLICE_TYPE_B, SLICE_TYPE_I, SLICE_TYPE_P, SLICE_TYPE_SP, vdec_hw_h264_pps_t::sps_id, and VDEC_HW_H264_LOGG_ERR.

Referenced by _vdec_hw_h264_nal_unit().

## ◆ _vdec_hw_h264_slice_header_post()

static void _vdec_hw_h264_slice_header_post | ( | vdec_hw_h264_t * | vdec | ) |
| static

References _vdec_hw_h264_dec_ref_pic_marking(), _vdec_hw_h264_pred_weight_table(), vdec_hw_h264_sps_t::chroma_format_idc, vdec_hw_h264_lps_t::nal_ref_idc, vdec_hw_h264_lps_t::nal_unit_type, vdec_hw_h264_lps_t::num_ref_idx_l0_active_minus1, vdec_hw_h264_lps_t::num_ref_idx_l1_active_minus1, vdec_hw_h264_lps_t::pps_id, vdec_hw_h264_sps_t::separate_colour_plane_flag, vdec_hw_h264_lps_t::slice_type, SLICE_TYPE_B, SLICE_TYPE_P, SLICE_TYPE_SP, vdec_hw_h264_pps_t::sps_id, vdec_hw_h264_pps_t::weighted_bipred_idc, and vdec_hw_h264_pps_t::weighted_pred_flag.

Referenced by _vdec_hw_h264_decode_picture().

## ◆ _vdec_hw_h264_unescape()

static uint32_t _vdec_hw_h264_unescape | ( | uint8_t * | b,
|  | uint32_t | len
| ) |  |
| static

00 00 03 foo -> 00 00 foo

References v.

Referenced by _vdec_hw_h264_nal_unit(), and vdec_hw_h264_put_config().

## ◆ parse_scaling_list()

static void parse_scaling_list | ( | bits_reader_t * | br,
|  | uint8_t * | scaling_list,
|  | int | len,
|  | int | index
| ) |  |
| static

References bits_exp_se(), default_4x4_inter, default_4x4_intra, default_8x8_inter, default_8x8_intra, zigzag_4x4, and zigzag_8x8.

Referenced by _vdec_hw_h264_read_pps(), and _vdec_hw_h264_read_sps().

## ◆ vdec_hw_h264_delete()

void vdec_hw_h264_delete | ( | vdec_hw_h264_t ** | dec | ) |

done

References _vdec_hw_h264_frame_free(), _vdec_hw_h264_reset_sequence(), vdec_hw_h264_s::frames, LOG_MODULE, MAX_PPS, MAX_REF_FRAMES, MAX_SPS, NULL, vdec_hw_h264_s::ref_frames_used, vdec_hw_h264_s::stats, vdec_hw_h264_s::user_frames, VDEC_HW_H264_LOGG_ERR, VDEC_HW_H264_LOGG_INFO, and vdec_hw_h264_reset().

Referenced by vdpau_h264_alter_dispose().

## ◆ vdec_hw_h264_flush()

int vdec_hw_h264_flush | ( | vdec_hw_h264_t * | dec | ) |

frame_ready () / frame_delete () any held frames now

References _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_flush_slices(), _vdec_hw_h264_nal_unit(), DPB_DRAW_REFS, lprintf, MAX_POC, and vdec_hw_h264_s::ref_frames_used.

Referenced by vdpau_h264_alter_flush().

## ◆ vdec_hw_h264_new()

vdec_hw_h264_t * vdec_hw_h264_new | ( | int(*)(void *user_data, vdec_hw_h264_logg_t level, const char *fmt,...) | logg,
|  | void * | user_data,
|  | int(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_new,
|  | int(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_render,
|  | int(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_ready,
|  | void(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_delete,
|  | int | num_frames
| ) |  |

References _vdec_hw_h264_reset_sequence(), BUF_PAD, vdec_hw_h264_s::frames, MAX_PPS, MAX_REF_FRAMES, MAX_SPS, MIN_BUFFER_SIZE, NULL, vdec_hw_h264_s::ref_frames_max, vdec_hw_h264_s::ref_frames_used, vdec_hw_h264_s::stats, user_data(), vdec_hw_h264_s::user_frames, and VDEC_HW_H264_FRAME_NEW_SEQ.

Referenced by open_plugin().

## ◆ vdec_hw_h264_put_config()

int vdec_hw_h264_put_config | ( | vdec_hw_h264_t * | dec,
|  | const uint8_t * | bitstream,
|  | uint32_t | num_bytes
| ) |  |

optional global head from media container

References _vdec_hw_h264_read_pps(), _vdec_hw_h264_read_sps(), _vdec_hw_h264_unescape(), bits_set_buf(), lprintf, and vdec_hw_h264_s::tempbuf.

Referenced by vdpau_h264_alter_decode_data().

## ◆ vdec_hw_h264_put_container_info()

int vdec_hw_h264_put_container_info | ( | vdec_hw_h264_t * | dec,
|  | int | width,
|  | int | height,
|  | int | duration,
|  | double | ratio
| ) |  |

optional, 0 means "no change".

References height, and width.

Referenced by vdpau_h264_alter_decode_data().

## ◆ vdec_hw_h264_put_frame()

int vdec_hw_h264_put_frame | ( | vdec_hw_h264_t * | dec,
|  | int64_t | pts,
|  | const uint8_t * | bitstream,
|  | uint32_t | num_bytes,
|  | int | frame_end
| ) |  |

send what you have

References _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_flush_buffer(), _vdec_hw_h264_flush_slices(), _vdec_hw_h264_nal_unit(), BUF_PAD, DPB_DRAW_CLEAR, LOG_MODULE, lprintf, MAX_BUFFER_SIZE, MAX_POC, NAL_END_SEQUENCE, NAL_SLICE_IDR, NAL_SLICE_NO_IDR, v, VDEC_HW_H264_LOGG_DEBUG, and VDEC_HW_H264_LOGG_ERR.

Referenced by vdpau_h264_alter_decode_data().

## ◆ vdec_hw_h264_reset()

int vdec_hw_h264_reset | ( | vdec_hw_h264_t * | dec | ) |

frame_delete () any held frames, set defaults

References _vdec_hw_h264_reset_sequence(), and vdec_hw_h264_s::ref_frames_used.

Referenced by vdec_hw_h264_delete(), and vdpau_h264_alter_reset().

## ◆ vdec_hw_h264_zero_pts()

int vdec_hw_h264_zero_pts | ( | vdec_hw_h264_t * | dec | ) |

zero all held frame pts

References vdec_hw_h264_frame_int_s::drop_pts, vdec_hw_h264_frame_int_s::f, vdec_hw_h264_s::frames, MAX_REF_FRAMES, vdec_hw_h264_frame_t::pts, vdec_hw_h264_s::ref_frames_used, and VDEC_HW_H264_FRAME_NEW_SEQ.

Referenced by vdpau_h264_alter_discontinuity().

## Variable Documentation

## ◆ default_4x4_inter

const uint8_t default_4x4_inter[16]
| static

Initial value:
= {
10, 14, 14, 20,
20, 20, 24, 24,
24, 24, 27, 27,
27, 30, 30, 34
}

Referenced by _vdec_hw_h264_scaling_list_fallback_A(), and parse_scaling_list().

## ◆ default_4x4_intra

const uint8_t default_4x4_intra[16]
| static

Initial value:
= {
6, 13, 13, 20,
20, 20, 28, 28,
28, 28, 32, 32,
32, 37, 37, 42
}

Referenced by _vdec_hw_h264_scaling_list_fallback_A(), and parse_scaling_list().

## ◆ default_8x8_inter

const uint8_t default_8x8_inter[64]
| static

Initial value:
= {
9, 13, 13, 15, 13, 15, 17, 17,
17, 17, 19, 19, 19, 19, 19, 21,
21, 21, 21, 21, 21, 22, 22, 22,
22, 22, 22, 22, 24, 24, 24, 24,
24, 24, 24, 24, 25, 25, 25, 25,
25, 25, 25, 27, 27, 27, 27, 27,
27, 28, 28, 28, 28, 28, 30, 30,
30, 30, 32, 32, 32, 33, 33, 35
}

Referenced by _vdec_hw_h264_scaling_list_fallback_A(), and parse_scaling_list().

## ◆ default_8x8_intra

const uint8_t default_8x8_intra[64]
| static

Initial value:
= {
6, 10, 10, 13, 11, 13, 16, 16,
16, 16, 18, 18, 18, 18, 18, 23,
23, 23, 23, 23, 23, 25, 25, 25,
25, 25, 25, 25, 27, 27, 27, 27,
27, 27, 27, 27, 29, 29, 29, 29,
29, 29, 29, 31, 31, 31, 31, 31,
31, 33, 33, 33, 33, 33, 36, 36,
36, 36, 38, 38, 38, 40, 40, 42
}

Referenced by _vdec_hw_h264_scaling_list_fallback_A(), and parse_scaling_list().

## ◆ zigzag_4x4

const uint8_t zigzag_4x4[16]
| static

Initial value:
= {
0, 1, 4, 8,
5, 2, 3, 6,
9, 12, 13, 10,
7, 11, 14, 15
}

Referenced by _vdec_hw_h264_scaling_list_fallback_A(), and parse_scaling_list().

## ◆ zigzag_8x8

const uint8_t zigzag_8x8[64]
| static

Initial value:
= {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
27, 20, 13, 6, 7, 14, 21, 28,
35, 42, 49, 56, 57, 50, 43, 36,
29, 22, 15, 23, 30, 37, 44, 51,
58, 59, 52, 45, 38, 31, 39, 46,
53, 60, 61, 54, 47, 55, 62, 63
}

Referenced by _vdec_hw_h264_scaling_list_fallback_A(), and parse_scaling_list().