summaryrefslogtreecommitdiff
path: root/libavcodec/dnxhddata.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dnxhddata.h')
-rw-r--r--libavcodec/dnxhddata.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h
index d97388818d..3ae4683a6c 100644
--- a/libavcodec/dnxhddata.h
+++ b/libavcodec/dnxhddata.h
@@ -31,6 +31,12 @@
#define DNXHD_MBAFF (1<<1)
#define DNXHD_444 (1<<2)
+/** Frame headers, extra 0x00 added to end for parser */
+#define DNXHD_HEADER_INITIAL 0x000002800100
+#define DNXHD_HEADER_444 0x000002800200
+#define DNXHD_HEADER_HR1 0x000002800300
+#define DNXHD_HEADER_HR2 0x0000038C0300
+
/** Indicate that a CIDEntry value must be read in the bitstream */
#define DNXHD_VARIABLE 0
@@ -59,7 +65,17 @@ int ff_dnxhd_get_cid_table(int cid);
int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth);
void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel);
+static av_always_inline uint64_t ff_dnxhd_check_header_prefix(uint64_t prefix)
+{
+ if (prefix == DNXHD_HEADER_INITIAL ||
+ prefix == DNXHD_HEADER_444 ||
+ prefix == DNXHD_HEADER_HR1 ||
+ prefix == DNXHD_HEADER_HR2)
+ return prefix;
+ return 0;
+}
+
int avpriv_dnxhd_get_frame_size(int cid);
int avpriv_dnxhd_get_interlaced(int cid);
-
+uint64_t avpriv_dnxhd_parse_header_prefix(const uint8_t *buf);
#endif /* AVCODEC_DNXHDDATA_H */