-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
344 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*! | ||
* COPYRIGHT (C) 2020 Emeric Grange - All Rights Reserved | ||
* | ||
* This file is part of MiniVideo. | ||
* | ||
* MiniVideo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* MiniVideo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with MiniVideo. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* \file h265_parameterset.c | ||
* \author Emeric Grange <[email protected]> | ||
* \date 2024 | ||
*/ | ||
|
||
// minivideo headers | ||
#include "h265_parameterset.h" | ||
|
||
// C standard libraries | ||
#include <cstdio> | ||
#include <cstdlib> | ||
#include <cmath> | ||
#include <cinttypes> | ||
|
||
/* ************************************************************************** */ | ||
|
||
/* ************************************************************************** */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*! | ||
* COPYRIGHT (C) 2020 Emeric Grange - All Rights Reserved | ||
* | ||
* This file is part of MiniVideo. | ||
* | ||
* MiniVideo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* MiniVideo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with MiniVideo. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* \file h265_parameterset.h | ||
* \author Emeric Grange <[email protected]> | ||
* \date 2024 | ||
*/ | ||
|
||
#ifndef H265_PARAMETER_SET_H | ||
#define H265_PARAMETER_SET_H | ||
|
||
// minivideo headers | ||
#include "h265_parameterset_struct.h" | ||
#include "../../bitstream.h" | ||
|
||
/* ************************************************************************** */ | ||
|
||
int h265_decodeVPS(Bitstream_t *bitstr, h265_vps_t *vps); | ||
void h265_printVPS(h265_vps_t *vps); | ||
void h265_mapVPS(h265_vps_t *vps, int64_t offset, int64_t size, FILE *xml); | ||
|
||
int h265_decodeSPS(Bitstream_t *bitstr, h265_sps_t *sps); | ||
void h265_printSPS(h265_sps_t *sps); | ||
void h265_mapSPS(h265_sps_t *sps, int64_t offset, int64_t size, FILE *xml); | ||
|
||
int h265_decodePPS(Bitstream_t *bitstr, h265_pps_t *pps, h265_sps_t **sps_array); | ||
void h265_printPPS(h265_pps_t *pps); | ||
void h265_mapPPS(h265_pps_t *pps, int64_t offset, int64_t size, FILE *xml); | ||
|
||
/* ************************************************************************** */ | ||
#endif // H265_PARAMETER_SET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/*! | ||
* COPYRIGHT (C) 2020 Emeric Grange - All Rights Reserved | ||
* | ||
* This file is part of MiniVideo. | ||
* | ||
* MiniVideo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* MiniVideo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with MiniVideo. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* \file h265_parameterset_struct.h | ||
* \author Emeric Grange <[email protected]> | ||
* \date 2024 | ||
*/ | ||
|
||
#ifndef H265_PARAMETER_SET_STRUCT_H | ||
#define H265_PARAMETER_SET_STRUCT_H | ||
|
||
#include <cstdint> | ||
|
||
/* ************************************************************************** */ | ||
|
||
#define H265_MAX_VPS 32 | ||
#define H265_MAX_SPS 32 | ||
#define H265_MAX_PPS 256 | ||
|
||
/* ************************************************************************** */ | ||
|
||
/*! | ||
* \struct h265_vps_t | ||
* \brief VPS - Video Parameter Set. | ||
* | ||
* From 'ITU-T H.265' recommendation: | ||
* - 7.3.2.1 Video parameter set syntax. | ||
* - 7.4.3.1 Video parameter set semantics. | ||
*/ | ||
typedef struct h265_vps_t | ||
{ | ||
// | ||
|
||
} h265_vps_t; | ||
|
||
/*! | ||
* \struct h265_sps_t | ||
* \brief SPS - Sequence Parameter Set. | ||
* | ||
* From 'ITU-T H.265' recommendation: | ||
* - 7.3.2.2 Sequence parameter set syntax. | ||
* - 7.4.3.2 Sequence parameter set semantics. | ||
*/ | ||
typedef struct h265_sps_t | ||
{ | ||
// | ||
|
||
} h265_sps_t; | ||
|
||
/*! | ||
* \struct h265_pps_t | ||
* \brief PPS - Picture Parameter Set. | ||
* | ||
* From 'ITU-T H.265' recommendation: | ||
* - 7.3.2.3 Picture parameter set syntax. | ||
* - 7.4.3.3 Picture parameter set semantics. | ||
*/ | ||
typedef struct h265_pps_t | ||
{ | ||
// | ||
|
||
} h265_pps_t; | ||
|
||
/*! | ||
* \struct h265_aud_t | ||
* \brief AUD - Access Unit Delimiter. | ||
* | ||
* From 'ITU-T H.265' recommendation: | ||
* - 7.3.2.5 Access unit delimiter syntax. | ||
* - 7.4.3.5 Access unit delimiter semantics. | ||
*/ | ||
typedef struct h265_aud_t | ||
{ | ||
uint8_t pic_type; | ||
|
||
} h265_aud_t; | ||
|
||
/* ************************************************************************** */ | ||
#endif // H265_PARAMETER_SET_STRUCT_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*! | ||
* COPYRIGHT (C) 2020 Emeric Grange - All Rights Reserved | ||
* | ||
* This file is part of MiniVideo. | ||
* | ||
* MiniVideo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* MiniVideo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with MiniVideo. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* \file h266_parameterset.c | ||
* \author Emeric Grange <[email protected]> | ||
* \date 2024 | ||
*/ | ||
|
||
// minivideo headers | ||
#include "h266_parameterset.h" | ||
|
||
// C standard libraries | ||
#include <cstdio> | ||
#include <cstdlib> | ||
#include <cmath> | ||
#include <cinttypes> | ||
|
||
/* ************************************************************************** */ | ||
|
||
/* ************************************************************************** */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*! | ||
* COPYRIGHT (C) 2020 Emeric Grange - All Rights Reserved | ||
* | ||
* This file is part of MiniVideo. | ||
* | ||
* MiniVideo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* MiniVideo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with MiniVideo. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* \file h266_parameterset.h | ||
* \author Emeric Grange <[email protected]> | ||
* \date 2024 | ||
*/ | ||
|
||
#ifndef H266_PARAMETER_SET_H | ||
#define H266_PARAMETER_SET_H | ||
|
||
// minivideo headers | ||
#include "h266_parameterset_struct.h" | ||
#include "../../bitstream.h" | ||
|
||
/* ************************************************************************** */ | ||
|
||
int h266_decodeVPS(Bitstream_t *bitstr, h266_vps_t *vps); | ||
void h266_printVPS(h266_vps_t *vps); | ||
void h266_mapVPS(h266_vps_t *vps, int64_t offset, int64_t size, FILE *xml); | ||
|
||
int h266_decodeSPS(Bitstream_t *bitstr, h266_sps_t *sps); | ||
void h266_printSPS(h266_sps_t *sps); | ||
void h266_mapSPS(h266_sps_t *sps, int64_t offset, int64_t size, FILE *xml); | ||
|
||
int h266_decodePPS(Bitstream_t *bitstr, h266_pps_t *pps, h266_sps_t **sps_array); | ||
void h266_printPPS(h266_pps_t *pps); | ||
void h266_mapPPS(h266_pps_t *pps, int64_t offset, int64_t size, FILE *xml); | ||
|
||
/* ************************************************************************** */ | ||
#endif // H266_PARAMETER_SET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/*! | ||
* COPYRIGHT (C) 2020 Emeric Grange - All Rights Reserved | ||
* | ||
* This file is part of MiniVideo. | ||
* | ||
* MiniVideo is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* MiniVideo is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with MiniVideo. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* \file h266_parameterset_struct.h | ||
* \author Emeric Grange <[email protected]> | ||
* \date 2024 | ||
*/ | ||
|
||
#ifndef H266_PARAMETER_SET_STRUCT_H | ||
#define H266_PARAMETER_SET_STRUCT_H | ||
|
||
#include <cstdint> | ||
|
||
/* ************************************************************************** */ | ||
|
||
#define H266_MAX_VPS 32 | ||
#define H266_MAX_SPS 32 | ||
#define H266_MAX_PPS 256 | ||
|
||
/* ************************************************************************** */ | ||
|
||
// DCI - Decoding Capability Information | ||
// 7.3.2.1 Decoding capability information syntax. | ||
// 7.4.3.1 Decoding capability information semantics. | ||
|
||
// OPI - Operating Point Information | ||
// 7.3.2.2 Operating point information syntax. | ||
// 7.4.3.2 Operating point information semantics. | ||
|
||
/*! | ||
* \struct h266_vps_t | ||
* \brief VPS - Video Parameter Set. | ||
* | ||
* From 'ITU-T H.266' recommendation: | ||
* - 7.3.2.3 Video parameter set syntax. | ||
* - 7.4.3.3 Video parameter set semantics. | ||
*/ | ||
typedef struct h266_vps_t | ||
{ | ||
// | ||
|
||
} h266_vps_t; | ||
|
||
/*! | ||
* \struct h266_sps_t | ||
* \brief SPS - Sequence Parameter Set. | ||
* | ||
* From 'ITU-T H.266' recommendation: | ||
* - 7.3.2.4 Sequence parameter set syntax. | ||
* - 7.4.3.4 Sequence parameter set semantics. | ||
*/ | ||
typedef struct h266_sps_t | ||
{ | ||
// | ||
|
||
} h266_sps_t; | ||
|
||
/*! | ||
* \struct h266_pps_t | ||
* \brief PPS - Picture Parameter Set. | ||
* | ||
* From 'ITU-T H.266' recommendation: | ||
* - 7.3.2.5 Picture parameter set syntax. | ||
* - 7.4.3.5 Picture parameter set semantics | ||
*/ | ||
typedef struct h266_pps_t | ||
{ | ||
// | ||
|
||
} h266_pps_t; | ||
|
||
/* ************************************************************************** */ | ||
#endif // H266_PARAMETER_SET_STRUCT_H |