diff options
Diffstat (limited to 'encoder/ih264e_encode_header.h')
-rw-r--r-- | encoder/ih264e_encode_header.h | 239 |
1 files changed, 22 insertions, 217 deletions
diff --git a/encoder/ih264e_encode_header.h b/encoder/ih264e_encode_header.h index c4876b3..3f480b4 100644 --- a/encoder/ih264e_encode_header.h +++ b/encoder/ih264e_encode_header.h @@ -31,13 +31,13 @@ * ittiam * * @remarks -* None +* none * ******************************************************************************* */ -#ifndef IH264E_ENCODE_HEADER_H_ -#define IH264E_ENCODE_HEADER_H_ +#ifndef _IH264E_ENCODE_HEADER_H_ +#define _IH264E_ENCODE_HEADER_H_ /*****************************************************************************/ /* Function Macros */ @@ -106,228 +106,33 @@ } /*****************************************************************************/ -/* Extern Function Declarations */ +/* Function Declarations */ /*****************************************************************************/ -/** -****************************************************************************** -* -* @brief Generates SPS (Sequence Parameter Set) -* -* @par Description -* This function generates Sequence Parameter Set header as per the spec -* -* @param[in] ps_bitstrm -* pointer to bitstream context (handle) -* -* @param[in] ps_sps -* pointer to structure containing SPS data -* -* @return success or failure error code -* -****************************************************************************** -*/ -WORD32 ih264e_generate_sps - ( - bitstrm_t *ps_bitstrm, - sps_t *ps_sps, - vui_t *ps_vui - ); - -/** -****************************************************************************** -* -* @brief Generates PPS (Picture Parameter Set) -* -* @par Description -* Generate Picture Parameter Set as per Section 7.3.2.2 -* -* @param[in] ps_bitstrm -* pointer to bitstream context (handle) -* -* @param[in] ps_pps -* pointer to structure containing PPS data -* -* @return success or failure error code -* -****************************************************************************** -*/ -WORD32 ih264e_generate_pps - ( - bitstrm_t *ps_bitstrm, - pps_t *ps_pps, - sps_t *ps_sps - ); - -/** -****************************************************************************** -* -* @brief Generates SEI (Supplemental Enhancement Information) -* -* @par Description -* This function generates Supplemental Enhancement Information header as per the spec -* -* @param[in] ps_bitstrm -* pointer to bitstream context (handle) -* -* @param[in] ps_sei -* pointer to structure containing SEI data -* -* @return success or failure error code -* -****************************************************************************** -*/ -IH264E_ERROR_T ih264e_generate_sei - ( - bitstrm_t *ps_bitstrm, - sei_params_t *ps_sei, - UWORD32 u4_insert_per_idr - ); +WORD32 ih264e_generate_sps(bitstrm_t *ps_bitstrm, sps_t *ps_sps, vui_t *ps_vui); -/** -****************************************************************************** -* -* @brief Generates Slice Header -* -* @par Description -* Generate Slice Header as per Section 7.3.5.1 -* -* @param[inout] ps_bitstrm -* pointer to bitstream context for generating slice header -* -* @param[in] ps_slice_hdr -* pointer to slice header params -* -* @param[in] ps_pps -* pointer to pps params referred by slice -* -* @param[in] ps_sps -* pointer to sps params referred by slice -* -* @param[out] ps_dup_bit_strm_ent_offset -* Bitstream struct to store bitstream state -* -* @param[out] pu4_first_slice_start_offset -* first slice offset is returned -* -* @return success or failure error code -* -****************************************************************************** -*/ -WORD32 ih264e_generate_slice_header - ( - bitstrm_t *ps_bitstrm, - slice_header_t *ps_slice_hdr, - pps_t *ps_pps, - sps_t *ps_sps - ); +WORD32 ih264e_generate_pps(bitstrm_t *ps_bitstrm, pps_t *ps_pps, sps_t *ps_sps); -/** -****************************************************************************** -* -* @brief Populates sps structure -* -* @par Description -* Populates sps structure for its use in header generation -* -* @param[in] ps_codec -* pointer to encoder context -* -* @param[out] ps_sps -* pointer to sps params that needs to be populated -* -* @return success or failure error code -* -****************************************************************************** -*/ -IH264E_ERROR_T ih264e_populate_sps - ( - codec_t *ps_codec, - sps_t *ps_sps - ); +IH264E_ERROR_T ih264e_generate_sei(bitstrm_t *ps_bitstrm, + sei_params_t *ps_sei, + UWORD32 u4_insert_per_idr); -/** -****************************************************************************** -* -* @brief Populates pps structure -* -* @par Description -* Populates pps structure for its use in header generation -* -* @param[in] ps_codec -* pointer to encoder context -* -* @param[out] ps_pps -* pointer to pps params that needs to be populated -* -* @return success or failure error code -* -****************************************************************************** -*/ -IH264E_ERROR_T ih264e_populate_pps - ( - codec_t *ps_codec, - pps_t *ps_pps - ); +WORD32 ih264e_generate_slice_header(bitstrm_t *ps_bitstrm, + slice_header_t *ps_slice_hdr, + pps_t *ps_pps, + sps_t *ps_sps); +IH264E_ERROR_T ih264e_populate_sps(codec_t *ps_codec, sps_t *ps_sps); -/** -****************************************************************************** -* -* @brief Populates slice header structure -* -* @par Description -* Populates slice header structure for its use in header generation -* -* @param[in] ps_proc -* pointer to proc context -* -* @param[out] ps_slice_hdr -* pointer to slice header structure that needs to be populated -* -* @param[in] ps_pps -* pointer to pps params structure referred by the slice -* -* @param[in] ps_sps -* pointer to sps params referred by the pps -* -* @return success or failure error code -* -****************************************************************************** -*/ -WORD32 ih264e_populate_slice_header - ( - process_ctxt_t *ps_proc, - slice_header_t *ps_slice_hdr, - pps_t *ps_pps, - sps_t *ps_sps - ); +IH264E_ERROR_T ih264e_populate_pps(codec_t *ps_codec, pps_t *ps_pps); +WORD32 ih264e_populate_slice_header(process_ctxt_t *ps_proc, + slice_header_t *ps_slice_hdr, + pps_t *ps_pps, + sps_t *ps_sps); -/** -****************************************************************************** -* -* @brief inserts FILLER Nal Unit. -* -* @par Description -* In constant bit rate rc mode, when the bits generated by the codec is -* underflowing the target bit rate, the encoder library inserts filler nal unit. -* -* @param[in] ps_bitstrm -* pointer to bitstream context (handle) -* -* @param[in] insert_fill_bytes -* Number of fill bytes to be inserted -* -* @return success or failure error code -* -****************************************************************************** -*/ -IH264E_ERROR_T ih264e_add_filler_nal_unit - ( - bitstrm_t *ps_bitstrm, - WORD32 insert_fill_bytes - ); +IH264E_ERROR_T ih264e_add_filler_nal_unit(bitstrm_t *ps_bitstrm, + WORD32 insert_fill_bytes); -#endif //IH264E_ENCODE_HEADER_H_ +#endif /* _IH264E_ENCODE_HEADER_H_ */ |