FFmpeg  4.3
Macros | Functions
cbs_h265_syntax_template.c File Reference

Go to the source code of this file.

Macros

#define profile_compatible(x)
 
#define profile_compatible(x)
 
#define SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid)
 
#define SEI_TYPE_N(type, prefix_valid, suffix_valid, name)
 
#define SEI_TYPE_S(type, prefix_valid, suffix_valid, name)
 
#define SEI_TYPE_E(type, prefix_valid, suffix_valid, name)
 

Functions

static int FUNC() rbsp_trailing_bits (CodedBitstreamContext *ctx, RWContext *rw)
 
static int FUNC() nal_unit_header (CodedBitstreamContext *ctx, RWContext *rw, H265RawNALUnitHeader *current, int expected_nal_unit_type)
 
static int FUNC() byte_alignment (CodedBitstreamContext *ctx, RWContext *rw)
 
static int FUNC() extension_data (CodedBitstreamContext *ctx, RWContext *rw, H265RawExtensionData *current)
 
static int FUNC() profile_tier_level (CodedBitstreamContext *ctx, RWContext *rw, H265RawProfileTierLevel *current, int profile_present_flag, int max_num_sub_layers_minus1)
 
static int FUNC() sub_layer_hrd_parameters (CodedBitstreamContext *ctx, RWContext *rw, H265RawHRDParameters *hrd, int nal, int sub_layer_id)
 
static int FUNC() hrd_parameters (CodedBitstreamContext *ctx, RWContext *rw, H265RawHRDParameters *current, int common_inf_present_flag, int max_num_sub_layers_minus1)
 
static int FUNC() vui_parameters (CodedBitstreamContext *ctx, RWContext *rw, H265RawVUI *current, const H265RawSPS *sps)
 
static int FUNC() vps (CodedBitstreamContext *ctx, RWContext *rw, H265RawVPS *current)
 
static int FUNC() st_ref_pic_set (CodedBitstreamContext *ctx, RWContext *rw, H265RawSTRefPicSet *current, int st_rps_idx, const H265RawSPS *sps)
 
static int FUNC() scaling_list_data (CodedBitstreamContext *ctx, RWContext *rw, H265RawScalingList *current)
 
static int FUNC() sps_range_extension (CodedBitstreamContext *ctx, RWContext *rw, H265RawSPS *current)
 
static int FUNC() sps_scc_extension (CodedBitstreamContext *ctx, RWContext *rw, H265RawSPS *current)
 
static int FUNC() sps (CodedBitstreamContext *ctx, RWContext *rw, H265RawSPS *current)
 
static int FUNC() pps_range_extension (CodedBitstreamContext *ctx, RWContext *rw, H265RawPPS *current)
 
static int FUNC() pps_scc_extension (CodedBitstreamContext *ctx, RWContext *rw, H265RawPPS *current)
 
static int FUNC() pps (CodedBitstreamContext *ctx, RWContext *rw, H265RawPPS *current)
 
static int FUNC() aud (CodedBitstreamContext *ctx, RWContext *rw, H265RawAUD *current)
 
static int FUNC() ref_pic_lists_modification (CodedBitstreamContext *ctx, RWContext *rw, H265RawSliceHeader *current, unsigned int num_pic_total_curr)
 
static int FUNC() pred_weight_table (CodedBitstreamContext *ctx, RWContext *rw, H265RawSliceHeader *current)
 
static int FUNC() slice_segment_header (CodedBitstreamContext *ctx, RWContext *rw, H265RawSliceHeader *current)
 
static int FUNC() sei_buffering_period (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIBufferingPeriod *current, uint32_t *payload_size, int *more_data)
 
static int FUNC() sei_pic_timing (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIPicTiming *current)
 
static int FUNC() sei_pan_scan_rect (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIPanScanRect *current)
 
static int FUNC() sei_user_data_registered (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIUserDataRegistered *current, uint32_t *payload_size)
 
static int FUNC() sei_user_data_unregistered (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIUserDataUnregistered *current, uint32_t *payload_size)
 
static int FUNC() sei_recovery_point (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIRecoveryPoint *current)
 
static int FUNC() sei_display_orientation (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIDisplayOrientation *current)
 
static int FUNC() sei_active_parameter_sets (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIActiveParameterSets *current)
 
static int FUNC() sei_decoded_picture_hash (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIDecodedPictureHash *current)
 
static int FUNC() sei_time_code (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEITimeCode *current)
 
static int FUNC() sei_mastering_display (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIMasteringDisplayColourVolume *current)
 
static int FUNC() sei_content_light_level (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIContentLightLevelInfo *current)
 
static int FUNC() sei_alternative_transfer_characteristics (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIAlternativeTransferCharacteristics *current)
 
static int FUNC() sei_alpha_channel_info (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIAlphaChannelInfo *current)
 
static int FUNC() payload_extension (CodedBitstreamContext *ctx, RWContext *rw, H265RawExtensionData *current, uint32_t payload_size, int cur_pos)
 
static int FUNC() sei_payload (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEIPayload *current, int prefix)
 
static int FUNC() sei (CodedBitstreamContext *ctx, RWContext *rw, H265RawSEI *current, int prefix)
 

Macro Definition Documentation

◆ profile_compatible [1/2]

#define profile_compatible (   x)
Value:
(current->general_profile_idc == (x) || \
current->general_profile_compatibility_flag[x])

◆ profile_compatible [2/2]

#define profile_compatible (   x)
Value:
(current->sub_layer_profile_idc[i] == (x) || \
current->sub_layer_profile_compatibility_flag[i][x])

◆ SEI_TYPE_CHECK_VALID

#define SEI_TYPE_CHECK_VALID (   name,
  prefix_valid,
  suffix_valid 
)
Value:
do { \
if (prefix && !prefix_valid) { \
av_log(ctx->log_ctx, AV_LOG_ERROR, "SEI type %s invalid " \
"as prefix SEI!\n", #name); \
} \
if (!prefix && !suffix_valid) { \
av_log(ctx->log_ctx, AV_LOG_ERROR, "SEI type %s invalid " \
"as suffix SEI!\n", #name); \
} \
} while (0)

◆ SEI_TYPE_N

#define SEI_TYPE_N (   type,
  prefix_valid,
  suffix_valid,
  name 
)
Value:
case HEVC_SEI_TYPE_ ## type: \
SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid); \
CHECK(FUNC(sei_ ## name)(ctx, rw, &current->payload.name)); \
break

◆ SEI_TYPE_S

#define SEI_TYPE_S (   type,
  prefix_valid,
  suffix_valid,
  name 
)
Value:
case HEVC_SEI_TYPE_ ## type: \
SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid); \
CHECK(FUNC(sei_ ## name)(ctx, rw, &current->payload.name, \
&current->payload_size)); \
break

◆ SEI_TYPE_E

#define SEI_TYPE_E (   type,
  prefix_valid,
  suffix_valid,
  name 
)
Value:
case HEVC_SEI_TYPE_ ## type: \
SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid); \
CHECK(FUNC(sei_ ## name)(ctx, rw, &current->payload.name, \
&current->payload_size, \
&more_data)); \
break

Function Documentation

◆ rbsp_trailing_bits()

static int FUNC() rbsp_trailing_bits ( CodedBitstreamContext ctx,
RWContext rw 
)
static

Definition at line 19 of file cbs_h265_syntax_template.c.

Referenced by aud(), pps(), sei(), sps(), and vps().

◆ nal_unit_header()

static int FUNC() nal_unit_header ( CodedBitstreamContext ctx,
RWContext rw,
H265RawNALUnitHeader current,
int  expected_nal_unit_type 
)
static

Definition at line 30 of file cbs_h265_syntax_template.c.

Referenced by aud(), pps(), sei(), slice_segment_header(), sps(), and vps().

◆ byte_alignment()

static int FUNC() byte_alignment ( CodedBitstreamContext ctx,
RWContext rw 
)
static

◆ extension_data()

static int FUNC() extension_data ( CodedBitstreamContext ctx,
RWContext rw,
H265RawExtensionData current 
)
static

Definition at line 61 of file cbs_h265_syntax_template.c.

Referenced by cbs_mpeg2_read_unit(), cbs_mpeg2_write_header(), pps(), sps(), and vps().

◆ profile_tier_level()

static int FUNC() profile_tier_level ( CodedBitstreamContext ctx,
RWContext rw,
H265RawProfileTierLevel current,
int  profile_present_flag,
int  max_num_sub_layers_minus1 
)
static

Definition at line 88 of file cbs_h265_syntax_template.c.

Referenced by sps(), and vps().

◆ sub_layer_hrd_parameters()

static int FUNC() sub_layer_hrd_parameters ( CodedBitstreamContext ctx,
RWContext rw,
H265RawHRDParameters hrd,
int  nal,
int  sub_layer_id 
)
static

Definition at line 229 of file cbs_h265_syntax_template.c.

Referenced by hrd_parameters().

◆ hrd_parameters()

static int FUNC() hrd_parameters ( CodedBitstreamContext ctx,
RWContext rw,
H265RawHRDParameters current,
int  common_inf_present_flag,
int  max_num_sub_layers_minus1 
)
static

Definition at line 254 of file cbs_h265_syntax_template.c.

Referenced by vps(), and vui_parameters().

◆ vui_parameters()

static int FUNC() vui_parameters ( CodedBitstreamContext ctx,
RWContext rw,
H265RawVUI current,
const H265RawSPS sps 
)
static

Definition at line 319 of file cbs_h265_syntax_template.c.

Referenced by sps().

◆ vps()

static int FUNC() vps ( CodedBitstreamContext ctx,
RWContext rw,
H265RawVPS current 
)
static

◆ st_ref_pic_set()

static int FUNC() st_ref_pic_set ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSTRefPicSet current,
int  st_rps_idx,
const H265RawSPS sps 
)
static

Definition at line 513 of file cbs_h265_syntax_template.c.

Referenced by slice_segment_header(), and sps().

◆ scaling_list_data()

static int FUNC() scaling_list_data ( CodedBitstreamContext ctx,
RWContext rw,
H265RawScalingList current 
)
static

Definition at line 668 of file cbs_h265_syntax_template.c.

Referenced by pps(), and sps().

◆ sps_range_extension()

static int FUNC() sps_range_extension ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSPS current 
)
static

Definition at line 699 of file cbs_h265_syntax_template.c.

Referenced by sps().

◆ sps_scc_extension()

static int FUNC() sps_scc_extension ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSPS current 
)
static

Definition at line 717 of file cbs_h265_syntax_template.c.

Referenced by sps().

◆ sps()

static int FUNC() sps ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSPS current 
)
static

◆ pps_range_extension()

static int FUNC() pps_range_extension ( CodedBitstreamContext ctx,
RWContext rw,
H265RawPPS current 
)
static

Definition at line 937 of file cbs_h265_syntax_template.c.

Referenced by pps().

◆ pps_scc_extension()

static int FUNC() pps_scc_extension ( CodedBitstreamContext ctx,
RWContext rw,
H265RawPPS current 
)
static

Definition at line 965 of file cbs_h265_syntax_template.c.

Referenced by pps().

◆ pps()

static int FUNC() pps ( CodedBitstreamContext ctx,
RWContext rw,
H265RawPPS current 
)
static

Definition at line 1005 of file cbs_h265_syntax_template.c.

Referenced by slice_segment_header().

◆ aud()

static int FUNC() aud ( CodedBitstreamContext ctx,
RWContext rw,
H265RawAUD current 
)
static

Definition at line 1128 of file cbs_h265_syntax_template.c.

◆ ref_pic_lists_modification()

static int FUNC() ref_pic_lists_modification ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSliceHeader current,
unsigned int  num_pic_total_curr 
)
static

Definition at line 1144 of file cbs_h265_syntax_template.c.

Referenced by slice_segment_header().

◆ pred_weight_table()

static int FUNC() pred_weight_table ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSliceHeader current 
)
static

Definition at line 1170 of file cbs_h265_syntax_template.c.

Referenced by slice_segment_header().

◆ slice_segment_header()

static int FUNC() slice_segment_header ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSliceHeader current 
)
static

Definition at line 1270 of file cbs_h265_syntax_template.c.

◆ sei_buffering_period()

static int FUNC() sei_buffering_period ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIBufferingPeriod current,
uint32_t *  payload_size,
int more_data 
)
static

Definition at line 1571 of file cbs_h265_syntax_template.c.

◆ sei_pic_timing()

static int FUNC() sei_pic_timing ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIPicTiming current 
)
static

Definition at line 1682 of file cbs_h265_syntax_template.c.

◆ sei_pan_scan_rect()

static int FUNC() sei_pan_scan_rect ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIPanScanRect current 
)
static

Definition at line 1757 of file cbs_h265_syntax_template.c.

◆ sei_user_data_registered()

static int FUNC() sei_user_data_registered ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIUserDataRegistered current,
uint32_t *  payload_size 
)
static

Definition at line 1783 of file cbs_h265_syntax_template.c.

◆ sei_user_data_unregistered()

static int FUNC() sei_user_data_unregistered ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIUserDataUnregistered current,
uint32_t *  payload_size 
)
static

Definition at line 1817 of file cbs_h265_syntax_template.c.

◆ sei_recovery_point()

static int FUNC() sei_recovery_point ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIRecoveryPoint current 
)
static

Definition at line 1847 of file cbs_h265_syntax_template.c.

◆ sei_display_orientation()

static int FUNC() sei_display_orientation ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIDisplayOrientation current 
)
static

Definition at line 1862 of file cbs_h265_syntax_template.c.

◆ sei_active_parameter_sets()

static int FUNC() sei_active_parameter_sets ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIActiveParameterSets current 
)
static

Definition at line 1880 of file cbs_h265_syntax_template.c.

◆ sei_decoded_picture_hash()

static int FUNC() sei_decoded_picture_hash ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIDecodedPictureHash current 
)
static

Definition at line 1916 of file cbs_h265_syntax_template.c.

◆ sei_time_code()

static int FUNC() sei_time_code ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEITimeCode current 
)
static

Definition at line 1947 of file cbs_h265_syntax_template.c.

◆ sei_mastering_display()

static int FUNC() sei_mastering_display ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIMasteringDisplayColourVolume current 
)
static

Definition at line 1997 of file cbs_h265_syntax_template.c.

◆ sei_content_light_level()

static int FUNC() sei_content_light_level ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIContentLightLevelInfo current 
)
static

Definition at line 2020 of file cbs_h265_syntax_template.c.

◆ sei_alternative_transfer_characteristics()

static int FUNC() sei_alternative_transfer_characteristics ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIAlternativeTransferCharacteristics current 
)
static

Definition at line 2033 of file cbs_h265_syntax_template.c.

◆ sei_alpha_channel_info()

static int FUNC() sei_alpha_channel_info ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIAlphaChannelInfo current 
)
static

Definition at line 2046 of file cbs_h265_syntax_template.c.

◆ payload_extension()

static int FUNC() payload_extension ( CodedBitstreamContext ctx,
RWContext rw,
H265RawExtensionData current,
uint32_t  payload_size,
int  cur_pos 
)
static

Definition at line 2074 of file cbs_h265_syntax_template.c.

Referenced by sei_payload().

◆ sei_payload()

static int FUNC() sei_payload ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEIPayload current,
int  prefix 
)
static

Definition at line 2110 of file cbs_h265_syntax_template.c.

Referenced by sei().

◆ sei()

static int FUNC() sei ( CodedBitstreamContext ctx,
RWContext rw,
H265RawSEI current,
int  prefix 
)
static

Definition at line 2208 of file cbs_h265_syntax_template.c.

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
rw
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo ug rw
Definition: fate.txt:150
x
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
Definition: fate.txt:150
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
ctx
AVFormatContext * ctx
Definition: movenc.c:48
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
FUNC
#define FUNC(a)
Definition: bit_depth_template.c:104
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59