digiKam
refpic.h
Go to the documentation of this file.
1 /*
2  * H.265 video codec.
3  * Copyright (c) 2013-2014 struktur AG, Dirk Farin <farin@struktur.de>
4  *
5  * This file is part of libde265.
6  *
7  * libde265 is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * libde265 is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with libde265. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef DE265_REFPIC_H
22 #define DE265_REFPIC_H
23 
24 #include "libde265/bitstream.h"
25 
26 #define MAX_NUM_REF_PICS 16 // maximum defined by standard, may be lower for some Levels
27 
28 
30 {
31  public:
32  // Lists of pictures that have to be kept in the decoded picture buffer for future
33  // reference and that may optionally be used for prediction in the current frame.
34  // Lists contain the relative POC positions.
35  int16_t DeltaPocS0[MAX_NUM_REF_PICS]; // sorted in decreasing order (e.g. -1, -2, -4, -7, ...)
36  int16_t DeltaPocS1[MAX_NUM_REF_PICS]; // sorted in ascending order (e.g. 1, 2, 4, 7)
37 
38  // flag for each reference whether this is actually used for prediction in the current frame
41 
42  uint8_t NumNegativePics; // number of past reference pictures
43  uint8_t NumPositivePics; // number of future reference pictures
44 
45  // --- derived values ---
46 
48 
49  uint8_t NumDeltaPocs; // total number of reference pictures (past + future)
50 
51  uint8_t NumPocTotalCurr_shortterm_only; /* Total number of reference pictures that may actually
52  be used for prediction in the current frame. */
53 
54  void reset();
55 };
56 
57 
59 void dump_compact_short_term_ref_pic_set(const ref_pic_set* set, int range, FILE* fh);
60 
61 #endif
Definition: refpic.h:30
void reset()
uint8_t UsedByCurrPicS0[MAX_NUM_REF_PICS]
Definition: refpic.h:39
int16_t DeltaPocS1[MAX_NUM_REF_PICS]
Definition: refpic.h:36
uint8_t NumPositivePics
Definition: refpic.h:43
int16_t DeltaPocS0[MAX_NUM_REF_PICS]
Definition: refpic.h:35
void compute_derived_values()
uint8_t NumDeltaPocs
Definition: refpic.h:49
uint8_t UsedByCurrPicS1[MAX_NUM_REF_PICS]
Definition: refpic.h:40
uint8_t NumNegativePics
Definition: refpic.h:42
uint8_t NumPocTotalCurr_shortterm_only
Definition: refpic.h:51
#define MAX_NUM_REF_PICS
Definition: refpic.h:26
void dump_short_term_ref_pic_set(const ref_pic_set *, FILE *fh)
void dump_compact_short_term_ref_pic_set(const ref_pic_set *set, int range, FILE *fh)