]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h2645_parse.h
Merge commit '785bfb1d7bb8de567c3aac1d9cc369b55ac9fb7b'
[ffmpeg] / libavcodec / h2645_parse.h
index db9800736f409ab808e7b12ffc98dc925a6a147b..361919251412ee1d0298c403036d027fb0b0dc10 100644 (file)
@@ -1,20 +1,20 @@
 /*
  * H.264/HEVC common parsing code
  *
- * This file is part of Libav.
+ * This file is part of FFmpeg.
  *
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg 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 2.1 of the License, or (at your option) any later version.
  *
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg 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 Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -33,13 +33,34 @@ typedef struct H2645NAL {
     int size;
     const uint8_t *data;
 
+    /**
+     * Size, in bits, of just the data, excluding the stop bit and any trailing
+     * padding. I.e. what HEVC calls SODB.
+     */
+    int size_bits;
+
     int raw_size;
     const uint8_t *raw_data;
 
     GetBitContext gb;
 
+    /**
+     * NAL unit type
+     */
     int type;
+
+    /**
+     * HEVC only, nuh_temporal_id_plus_1 - 1
+     */
     int temporal_id;
+
+    int skipped_bytes;
+    int skipped_bytes_pos_size;
+    int *skipped_bytes_pos;
+    /**
+     * H264 only, nal_ref_idc
+     */
+    int ref_idc;
 } H2645NAL;
 
 /* an input packet split into unescaped NAL units */
@@ -59,7 +80,8 @@ int ff_h2645_extract_rbsp(const uint8_t *src, int length,
  * Split an input packet into NAL units.
  */
 int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
-                          void *logctx, int is_nalff, int nal_length_size);
+                          void *logctx, int is_nalff, int nal_length_size,
+                          enum AVCodecID codec_id);
 
 /**
  * Free all the allocated memory in the packet.