FFmpeg
Data Structures | Macros | Functions
ps.h File Reference
#include <stdint.h>
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/h2645_vui.h"
#include "hevc.h"

Go to the source code of this file.

Data Structures

struct  HEVCSublayerHdrParams
 
struct  HEVCHdrFlagParams
 
struct  HEVCHdrParams
 
struct  ShortTermRPS
 
struct  HEVCWindow
 
struct  VUI
 
struct  PTLCommon
 
struct  PTL
 
struct  RepFormat
 
struct  HEVCVPS
 
struct  ScalingList
 
struct  HEVCSPS
 
struct  HEVCPPS
 
struct  HEVCParamSets
 

Macros

#define HEVC_VPS_MAX_LAYERS   2
 

Functions

int ff_hevc_parse_sps (HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, unsigned nuh_layer_id, int apply_defdispwin, const HEVCVPS *const *vps_list, AVCodecContext *avctx)
 Parse the SPS from the bitstream into the provided HEVCSPS struct. More...
 
int ff_hevc_decode_nal_vps (GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
 
int ff_hevc_decode_nal_sps (GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps, unsigned nuh_layer_id, int apply_defdispwin)
 
int ff_hevc_decode_nal_pps (GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
 
void ff_hevc_ps_uninit (HEVCParamSets *ps)
 
int ff_hevc_decode_short_term_rps (GetBitContext *gb, AVCodecContext *avctx, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header)
 
int ff_hevc_encode_nal_vps (HEVCVPS *vps, unsigned int id, uint8_t *buf, int buf_size)
 
int ff_hevc_compute_poc (const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type)
 Compute POC of the current frame and return it. More...
 

Macro Definition Documentation

◆ HEVC_VPS_MAX_LAYERS

#define HEVC_VPS_MAX_LAYERS   2

Definition at line 35 of file ps.h.

Function Documentation

◆ ff_hevc_parse_sps()

int ff_hevc_parse_sps ( HEVCSPS sps,
GetBitContext gb,
unsigned int *  sps_id,
unsigned  nuh_layer_id,
int  apply_defdispwin,
const HEVCVPS *const *  vps_list,
AVCodecContext avctx 
)

Parse the SPS from the bitstream into the provided HEVCSPS struct.

Parameters
sps_idthe SPS id will be written here
apply_defdispwinif set 1, the default display window from the VUI will be applied to the video dimensions
vps_listif non-NULL, this function will validate that the SPS refers to an existing VPS

Definition at line 1154 of file ps.c.

Referenced by ff_hevc_decode_nal_sps(), and generate_fake_vps().

◆ ff_hevc_decode_nal_vps()

int ff_hevc_decode_nal_vps ( GetBitContext gb,
AVCodecContext avctx,
HEVCParamSets ps 
)

Definition at line 716 of file ps.c.

Referenced by decode_nal_unit(), hevc_decode_nal_units(), and parse_nal_units().

◆ ff_hevc_decode_nal_sps()

int ff_hevc_decode_nal_sps ( GetBitContext gb,
AVCodecContext avctx,
HEVCParamSets ps,
unsigned  nuh_layer_id,
int  apply_defdispwin 
)

Definition at line 1650 of file ps.c.

Referenced by decode_nal_unit(), hevc_decode_nal_units(), and parse_nal_units().

◆ ff_hevc_decode_nal_pps()

int ff_hevc_decode_nal_pps ( GetBitContext gb,
AVCodecContext avctx,
HEVCParamSets ps 
)

Definition at line 2112 of file ps.c.

Referenced by decode_nal_unit(), hevc_decode_nal_units(), and parse_nal_units().

◆ ff_hevc_ps_uninit()

void ff_hevc_ps_uninit ( HEVCParamSets ps)

Definition at line 2384 of file ps.c.

Referenced by hevc_decode_free(), and hevc_parser_close().

◆ ff_hevc_decode_short_term_rps()

int ff_hevc_decode_short_term_rps ( GetBitContext gb,
AVCodecContext avctx,
ShortTermRPS rps,
const HEVCSPS sps,
int  is_slice_header 
)

Definition at line 89 of file ps.c.

Referenced by ff_hevc_parse_sps(), and hls_slice_header().

◆ ff_hevc_encode_nal_vps()

int ff_hevc_encode_nal_vps ( HEVCVPS vps,
unsigned int  id,
uint8_t *  buf,
int  buf_size 
)

Definition at line 66 of file ps_enc.c.

Referenced by generate_fake_vps().

◆ ff_hevc_compute_poc()

int ff_hevc_compute_poc ( const HEVCSPS sps,
int  pocTid0,
int  poc_lsb,
int  nal_unit_type 
)

Compute POC of the current frame and return it.

Definition at line 2396 of file ps.c.

Referenced by hevc_parse_slice_header(), and hls_slice_header().