diff --git a/include/h264/decode.h b/include/h264/decode.h index eefb313..e59d57f 100644 --- a/include/h264/decode.h +++ b/include/h264/decode.h @@ -1,5 +1,4 @@ #pragma once -#include "enum.h" #include "stream.h" /** @@ -12,6 +11,24 @@ extern "C" { #endif +//! h264 decoder parameters for H264DECSetParam. +typedef enum H264Parameter +{ + //! Set the callback which is called when a frame is output from the decoder. + H264_PARAMETER_FRAME_POINTER_OUTPUT = 1, + + //! Set whether the decoder should internally buffer frames or call the callback + //! immediately as soon as a frame is emitted. + H264_PARAMETER_OUTPUT_PER_FRAME = 0x20000002, + + H264_PARAMETER_UNKNOWN_20000010 = 0x20000010, + H264_PARAMETER_UNKNOWN_20000030 = 0x20000030, + H264_PARAMETER_UNKNOWN_20000040 = 0x20000040, + + //! Set a user memory pointer which is passed to the frame output callback. + H264_PARAMETER_USER_MEMORY = 0x70000001, +} H264Parameter; + /** * Calculate the amount of memory required for the specified parameters. diff --git a/include/h264/enum.h b/include/h264/enum.h deleted file mode 100644 index 8e24acb..0000000 --- a/include/h264/enum.h +++ /dev/null @@ -1,56 +0,0 @@ -#pragma once -#include - -/** - * \defgroup h264_enum Enums - * \ingroup h264 - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -//! h264 library errors. -typedef enum H264Error -{ - //! No errors. - H264_ERROR_OK = 0, - //! Invalid picture parameter set. - H264_ERROR_INVALID_PPS = 24, - //! Invalid sequence parameter set. - H264_ERROR_INVALID_SPS = 26, - //! Invalid slice header. - H264_ERROR_INVALID_SLICEHEADER = 61, - //! Generic h264 error. - H264_ERROR_GENERIC = 0x1000000, - //! Invalid parameters passed. - H264_ERROR_INVALID_PARAMETER = 0x1010000, - //! The amount of memory provided to the h264 library - //! is insufficient. - H264_ERROR_OUT_OF_MEMORY = 0x1020000, - //! Invalid h264 stream profile. Only the baseline (66), - //! main (77) and high (100) profiles are allowed. - H264_ERROR_INVALID_PROFILE = 0x1080000, -} H264Error; - -//! h264 decoder parameters for H264DECSetParam. -typedef enum H264Parameter -{ - //! Set the callback which is called when a frame is output from the decoder. - H264_PARAMETER_FRAME_POINTER_OUTPUT = 1, - //! Set whether the decoder should internally buffer frames or call the callback - //! immediately as soon as a frame is emitted. - H264_PARAMETER_OUTPUT_PER_FRAME = 0x20000002, - H264_PARAMETER_UNKNOWN_20000010 = 0x20000010, - H264_PARAMETER_UNKNOWN_20000030 = 0x20000030, - H264_PARAMETER_UNKNOWN_20000040 = 0x20000040, - //! Set a user memory pointer which is passed to the frame output callback. - H264_PARAMETER_USER_MEMORY = 0x70000001, -} H264Parameter; - -#ifdef __cplusplus -} -#endif - -/** @} */ diff --git a/include/h264/stream.h b/include/h264/stream.h index ea34300..2bee3be 100644 --- a/include/h264/stream.h +++ b/include/h264/stream.h @@ -1,5 +1,4 @@ #pragma once -#include "enum.h" /** * \defgroup h264_stream H264 Stream @@ -17,6 +16,36 @@ typedef struct H264DecodeOutput H264DecodeOutput; typedef void (*H264DECFptrOutputFn)(H264DecodeOutput *output); +//! h264 library errors. +typedef enum H264Error +{ + //! No errors. + H264_ERROR_OK = 0, + + //! Invalid picture parameter set. + H264_ERROR_INVALID_PPS = 24, + + //! Invalid sequence parameter set. + H264_ERROR_INVALID_SPS = 26, + + //! Invalid slice header. + H264_ERROR_INVALID_SLICEHEADER = 61, + + //! Generic h264 error. + H264_ERROR_GENERIC = 0x1000000, + + //! Invalid parameters passed. + H264_ERROR_INVALID_PARAMETER = 0x1010000, + + //! The amount of memory provided to the h264 library + //! is insufficient. + H264_ERROR_OUT_OF_MEMORY = 0x1020000, + + //! Invalid h264 stream profile. Only the baseline (66), + //! main (77) and high (100) profiles are allowed. + H264_ERROR_INVALID_PROFILE = 0x1080000, +} H264Error; + struct WUT_PACKED H264DecodedVuiParameters { uint8_t aspect_ratio_info_present_flag; diff --git a/tests/test_compile_headers_common/test_compile_headers_list.h b/tests/test_compile_headers_common/test_compile_headers_list.h index f47fa5e..649ec5c 100644 --- a/tests/test_compile_headers_common/test_compile_headers_list.h +++ b/tests/test_compile_headers_common/test_compile_headers_list.h @@ -72,7 +72,6 @@ #include #include #include -#include #include #include #include