@@ -405,6 +405,18 @@ enum class AV1TxMode
405
405
AV1_TX_MODE_SELECT = 2
406
406
};
407
407
408
+ /* *
409
+ * @sa 6.7.1. General metadata OBU semantics
410
+ */
411
+ enum class AV1MetadataType
412
+ {
413
+ METADATA_TYPE_HDR_CLL = 1 ,
414
+ METADATA_TYPE_HDR_MDCV = 2 ,
415
+ METADATA_TYPE_SCALABILITY = 3 ,
416
+ METADATA_TYPE_ITUT_T35 = 4 ,
417
+ METADATA_TYPE_TIMECODE = 5
418
+ };
419
+
408
420
class AV1ColorConfigSyntax
409
421
{
410
422
public:
@@ -480,7 +492,7 @@ class AV1TemporalDelimiterObuSyntax
480
492
class AV1PaddingOBUSyntax
481
493
{
482
494
public:
483
- using ptr = std::shared_ptr<AV1OperatingParametersInfoSyntax >;
495
+ using ptr = std::shared_ptr<AV1PaddingOBUSyntax >;
484
496
public:
485
497
AV1PaddingOBUSyntax ();
486
498
~AV1PaddingOBUSyntax ();
@@ -691,9 +703,14 @@ class AV1GeneralMetadataOBUSyntax
691
703
using ptr = std::shared_ptr<AV1GeneralMetadataOBUSyntax>;
692
704
public:
693
705
AV1GeneralMetadataOBUSyntax ();
694
- ~AV1GeneralMetadataOBUSyntax ();
706
+ ~AV1GeneralMetadataOBUSyntax () = default ;
695
707
public:
696
708
uint32_t metadata_type;
709
+ AV1MetadataITUT_T35Syntax::ptr metadata_itut_t35;
710
+ AV1MetadataHighDynamicRangeContentLightLevelSyntax::ptr metadata_hdr_cll;
711
+ AV1MetadataHighDynamicRangeMasteringDisplayColorVolumeSyntax::ptr metadata_hdr_mdcv;
712
+ AV1MetadataScalabilitySyntax::ptr metadata_scalability;
713
+ AV1MetadataTimecodeSyntax::ptr metadata_timecode;
697
714
};
698
715
699
716
class AV1SuperresParamsSyntax
@@ -802,6 +819,45 @@ class AV1QuantizationParamsSyntax
802
819
uint8_t qm_v;
803
820
};
804
821
822
+ class AV1FilmGrainParamsSyntax
823
+ {
824
+ public:
825
+ using ptr = std::shared_ptr<AV1FilmGrainParamsSyntax>;
826
+ public:
827
+ AV1FilmGrainParamsSyntax ();
828
+ ~AV1FilmGrainParamsSyntax () = default ;
829
+ public:
830
+ uint8_t apply_grain;
831
+ uint16_t grain_seed;
832
+ uint8_t update_grain;
833
+ uint8_t film_grain_params_ref_idx;
834
+ uint8_t num_y_points;
835
+ std::vector<uint8_t > point_y_value;
836
+ std::vector<uint8_t > point_y_scaling;
837
+ uint8_t chroma_scaling_from_luma;
838
+ uint8_t num_cb_points;
839
+ std::vector<uint8_t > point_cb_value;
840
+ std::vector<uint8_t > point_cb_scaling;
841
+ uint8_t num_cr_points;
842
+ std::vector<uint8_t > point_cr_value;
843
+ std::vector<uint8_t > point_cr_scaling;
844
+ uint8_t grain_scaling_minus_8;
845
+ uint8_t ar_coeff_lag;
846
+ std::vector<uint8_t > ar_coeffs_y_plus_128;
847
+ std::vector<uint8_t > ar_coeffs_cb_plus_128;
848
+ std::vector<uint8_t > ar_coeffs_cr_plus_128;
849
+ uint8_t ar_coeff_shift_minus_6;
850
+ uint8_t grain_scale_shift;
851
+ uint8_t cb_mult;
852
+ uint8_t cb_luma_mult;
853
+ uint16_t cb_offset;
854
+ uint8_t cr_mult;
855
+ uint8_t cr_luma_mult;
856
+ uint16_t cr_offset;
857
+ uint8_t overlap_flag;
858
+ uint8_t clip_to_restricted_range;
859
+ };
860
+
805
861
class AV1UncompressedHeaderSyntax
806
862
{
807
863
public:
@@ -820,8 +876,16 @@ class AV1UncompressedHeaderSyntax
820
876
uint8_t frame_size_override_flag;
821
877
uint8_t allow_intrabc;
822
878
uint8_t primary_ref_frame;
879
+ uint8_t error_resilient_mode;
880
+ uint8_t disable_cdf_update;
881
+ uint8_t allow_screen_content_tools;
882
+ uint8_t force_integer_mv;
883
+ uint64_t current_frame_id;
884
+ uint8_t buffer_removal_time_present_flag;
885
+ std::vector<uint64_t > buffer_removal_time;
823
886
public:
824
887
AV1TemporalPointInfoSyntax::ptr temporal_point_info;
888
+ AV1FilmGrainParamsSyntax::ptr load_grain_params;
825
889
};
826
890
827
891
class AV1TxModeSyntax
@@ -846,45 +910,6 @@ class AV1FrameReferenceModeSyntax
846
910
uint8_t reference_select;
847
911
};
848
912
849
- class AV1FilmGrainParamsSyntax
850
- {
851
- public:
852
- using ptr = std::shared_ptr<AV1FilmGrainParamsSyntax>;
853
- public:
854
- AV1FilmGrainParamsSyntax ();
855
- ~AV1FilmGrainParamsSyntax () = default ;
856
- public:
857
- uint8_t apply_grain;
858
- uint16_t grain_seed;
859
- uint8_t update_grain;
860
- uint8_t film_grain_params_ref_idx;
861
- uint8_t num_y_points;
862
- std::vector<uint8_t > point_y_value;
863
- std::vector<uint8_t > point_y_scaling;
864
- uint8_t chroma_scaling_from_luma;
865
- uint8_t num_cb_points;
866
- std::vector<uint8_t > point_cb_value;
867
- std::vector<uint8_t > point_cb_scaling;
868
- uint8_t num_cr_points;
869
- std::vector<uint8_t > point_cr_value;
870
- std::vector<uint8_t > point_cr_scaling;
871
- uint8_t grain_scaling_minus_8;
872
- uint8_t ar_coeff_lag;
873
- std::vector<uint8_t > ar_coeffs_y_plus_128;
874
- std::vector<uint8_t > ar_coeffs_cb_plus_128;
875
- std::vector<uint8_t > ar_coeffs_cr_plus_128;
876
- uint8_t ar_coeff_shift_minus_6;
877
- uint8_t grain_scale_shift;
878
- uint8_t cb_mult;
879
- uint8_t cb_luma_mult;
880
- uint16_t cb_offset;
881
- uint8_t cr_mult;
882
- uint8_t cr_luma_mult;
883
- uint16_t cr_offset;
884
- uint8_t overlap_flag;
885
- uint8_t clip_to_restricted_range;
886
- };
887
-
888
913
class AV1GeneralTileGroupOBUSyntax
889
914
{
890
915
public:
@@ -894,8 +919,9 @@ class AV1GeneralTileGroupOBUSyntax
894
919
~AV1GeneralTileGroupOBUSyntax () = default ;
895
920
public:
896
921
uint8_t tile_start_and_end_present_flag;
897
- uint32_t tg_start;
898
- uint32_t tg_end;
922
+ uint64_t tg_start;
923
+ uint64_t tg_end;
924
+ uint64_t tile_size_minus_1;
899
925
};
900
926
901
927
class AV1LoopRestorationParamsSyntax
@@ -1000,6 +1026,23 @@ class AV1LoopFilterParamsSyntax
1000
1026
uint32_t loop_filter_mode_deltas[2 ] = {0 };
1001
1027
};
1002
1028
1029
+ class AV1TileInfoSyntax
1030
+ {
1031
+ public:
1032
+ using ptr = std::shared_ptr<AV1TileInfoSyntax>;
1033
+ public:
1034
+ AV1TileInfoSyntax ();
1035
+ ~AV1TileInfoSyntax () = default ;
1036
+ public:
1037
+ uint8_t uniform_tile_spacing_flag;
1038
+ std::vector<uint8_t > increment_tile_cols_log2;
1039
+ std::vector<uint8_t > increment_tile_rows_log2;
1040
+ std::vector<uint64_t > width_in_sbs_minus_1;
1041
+ std::vector<uint64_t > height_in_sbs_minus_1;
1042
+ uint64_t context_update_tile_id;
1043
+ uint8_t tile_size_bytes_minus_1;
1044
+ };
1045
+
1003
1046
/* *
1004
1047
* @sa 7.20. Reference frame update process
1005
1048
*/
@@ -1045,18 +1088,24 @@ class AV1ReferenceFrameContext
1045
1088
uint8_t LoopRestorationSize[4 ];
1046
1089
uint8_t AllLossless;
1047
1090
uint8_t TxMode;
1048
- uint32_t NumTiles;
1049
- uint16_t TileCols;
1050
- uint16_t TileRows;
1051
- uint16_t TileColsLog2;
1052
- uint16_t TileRowsLog2;
1091
+ uint64_t NumTiles;
1092
+ uint64_t TileCols;
1093
+ uint64_t TileRows;
1094
+ uint64_t TileColsLog2;
1095
+ uint64_t TileRowsLog2;
1053
1096
uint8_t FeatureEnabled[AV1_SYMBOL(MAX_SEGMENTS)][AV1_SYMBOL(SEG_LVL_MAX)] = {0 };
1054
1097
uint8_t Segmentation_Feature_Bits[AV1_SYMBOL(SEG_LVL_MAX)] = {0 };
1055
1098
uint8_t Segmentation_Feature_Max[AV1_SYMBOL(SEG_LVL_MAX)] = {0 };
1056
1099
uint8_t Segmentation_Feature_Signed[AV1_SYMBOL(SEG_LVL_MAX)] = {0 };
1057
1100
int64_t FeatureData[AV1_SYMBOL(MAX_SEGMENTS)][AV1_SYMBOL(SEG_LVL_MAX)] = {0 };
1058
1101
uint8_t SegIdPreSkip;
1059
1102
uint8_t LastActiveSegId;
1103
+ uint8_t RefValid[AV1_SYMBOL(NUM_REF_FRAMES)] = {0 };
1104
+ uint8_t RefOrderHint[AV1_SYMBOL(NUM_REF_FRAMES)] = {0 };
1105
+ uint8_t OrderHints[AV1_REF(LAST_FRAME) + AV1_SYMBOL(REFS_PER_FRAME)] = {0 };
1106
+ uint64_t TileSizeBytes;
1107
+ uint64_t MiColStarts[AV1_SYMBOL(MAX_TILE_COLS)] = {0 };
1108
+ uint64_t MiRowStarts[AV1_SYMBOL(MAX_TILE_COLS)] = {0 };
1060
1109
};
1061
1110
1062
1111
} // namespace Codec
0 commit comments