summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4data.h
diff options
context:
space:
mode:
authorKieran Kunhya <kierank@obe.tv>2017-12-29 15:42:14 +0000
committerKieran Kunhya <kierank@obe.tv>2018-04-02 13:06:23 +0100
commitf9d3841ae6147eaa51c57c574cd81e9ce9566e3a (patch)
treedd24a952bd115ed8596b952999aad07dcc36742e /libavcodec/mpeg4data.h
parent699fa8f382704acdbdf720042dd7b21df2eb7558 (diff)
mpeg4video: Add support for MPEG-4 Simple Studio Profile.
This is a profile supporting > 8-bit video and has a higher quality DCT
Diffstat (limited to 'libavcodec/mpeg4data.h')
-rw-r--r--libavcodec/mpeg4data.h116
1 files changed, 116 insertions, 0 deletions
diff --git a/libavcodec/mpeg4data.h b/libavcodec/mpeg4data.h
index b7c3faba0d..4756e9ea1d 100644
--- a/libavcodec/mpeg4data.h
+++ b/libavcodec/mpeg4data.h
@@ -373,4 +373,120 @@ const uint8_t ff_mpeg4_dc_threshold[8]={
99, 13, 15, 17, 19, 21, 23, 0
};
+/* Note these are different in studio mode */
+const uint16_t ff_mpeg4_studio_dc_luma[19][2]={
+ {0x0e, 6}, {0x06, 5}, {0x00, 4}, {0x02, 4},
+ {0x07, 3}, {0x05, 3}, {0x03, 3}, {0x02, 3},
+ {0x04, 3}, {0x06, 3}, {0x01, 4}, {0x1e, 7},
+ {0x3e, 8}, {0x7e, 9}, {0xfe, 10}, {0x1fe, 11},
+ {0x3fe, 12}, {0x7fe, 13}, {0x7ff, 13}
+};
+
+const uint16_t ff_mpeg4_studio_dc_chroma[19][2]={
+ {0x00, 4}, {0x02, 4}, {0x07, 3}, {0x05, 3},
+ {0x03, 3}, {0x02, 3}, {0x04, 3}, {0x06, 3},
+ {0x01, 4}, {0x06, 5}, {0x0e, 6}, {0x1e, 7},
+ {0x3e, 8}, {0x7e, 9}, {0xfe, 10}, {0x1fe, 11},
+ {0x3fe, 12}, {0x7fe, 13}, {0x7ff, 13}
+};
+
+const uint16_t ff_mpeg4_studio_intra[12][22][2]={
+ {
+ {0x05, 4}, {0x04, 4}, {0x05, 7}, {0x09, 9},
+ {0x21, 11}, {0x41, 12}, {0x81, 13}, {0x03, 4},
+ {0x03, 5}, {0x05, 6}, {0x04, 7}, {0x03, 7},
+ {0x05, 8}, {0x03, 2}, {0x05, 3}, {0x04, 3},
+ {0x03, 3}, {0x02, 4}, {0x04, 6}, {0x03, 6},
+ {0x11, 10}, {0x80, 13}
+ },
+ {
+ {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0},
+ {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0},
+ {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0},
+ {0x00, 0}, {0x00, 0}, {0x01, 1}, {0x01, 2},
+ {0x01, 3}, {0x01, 4}, {0x01, 5}, {0x03, 7},
+ {0x05, 8}, {0x04, 8}
+ },
+ {
+ {0x05, 3}, {0x03, 5}, {0x02, 5}, {0x03, 7},
+ {0x09, 9}, {0x103, 14}, {0x102, 14}, {0x04, 3},
+ {0x03, 3}, {0x03, 4}, {0x02, 4}, {0x03, 6},
+ {0x11, 10}, {0x03, 2}, {0x02, 3}, {0x02, 6},
+ {0x05, 8}, {0x21, 11}, {0x83, 13}, {0x101, 14},
+ {0x201, 15}, {0x82, 13}
+ },
+ {
+ {0x05, 5}, {0x05, 4}, {0x04, 5}, {0x03, 6},
+ {0x09, 9}, {0x83, 13}, {0x82, 13}, {0x03, 3},
+ {0x04, 4}, {0x03, 4}, {0x03, 5}, {0x05, 8},
+ {0x81, 13}, {0x03, 2}, {0x02, 2}, {0x02, 5},
+ {0x02, 6}, {0x03, 7}, {0x11, 10}, {0x43, 12},
+ {0x80, 13}, {0x42, 12}
+ },
+ {
+ {0x05, 7}, {0x03, 4}, {0x03, 5}, {0x04, 7},
+ {0x09, 9}, {0x83, 13}, {0x101, 14}, {0x03, 3},
+ {0x02, 4}, {0x05, 6}, {0x03, 7}, {0x11, 10},
+ {0x201, 15}, {0x03, 2}, {0x02, 2}, {0x02, 3},
+ {0x04, 6}, {0x03, 6}, {0x05, 8}, {0x21, 11},
+ {0x82, 13}, {0x81, 13}
+ },
+ {
+ {0x13, 10}, {0x03, 5}, {0x05, 7}, {0x12, 10},
+ {0x43, 12}, {0x83, 13}, {0x82, 13}, {0x02, 5},
+ {0x04, 7}, {0x05, 8}, {0x23, 11}, {0x81, 13},
+ {0x101, 14}, {0x03, 2}, {0x02, 2}, {0x01, 2},
+ {0x01, 3}, {0x03, 6}, {0x03, 7}, {0x22, 11},
+ {0x201, 15}, {0x42, 12}
+ },
+ {
+ {0x23, 11}, {0x01, 4}, {0x07, 8}, {0x13, 10},
+ {0x22, 11}, {0x103, 14}, {0x102, 14}, {0x03, 6},
+ {0x06, 8}, {0x12, 10}, {0x43, 12}, {0x101, 14},
+ {0x201, 15}, {0x03, 3}, {0x02, 3}, {0x03, 2},
+ {0x02, 2}, {0x01, 3}, {0x02, 6}, {0x05, 8},
+ {0x42, 12}, {0x41, 12}
+ },
+ {
+ {0x0b, 9}, {0x03, 5}, {0x07, 8}, {0x07, 7},
+ {0x06, 7}, {0x23, 11}, {0x41, 12}, {0x05, 7},
+ {0x06, 8}, {0x0a, 9}, {0x13, 10}, {0x22, 11},
+ {0x40, 12}, {0x03, 4}, {0x02, 4}, {0x03, 2},
+ {0x02, 2}, {0x01, 2}, {0x02, 5}, {0x04, 7},
+ {0x12, 10}, {0x21, 11}
+ },
+ {
+ {0x15, 10}, {0x03, 6}, {0x14, 10}, {0x23, 11},
+ {0x07, 8}, {0x43, 12}, {0x81, 13}, {0x06, 8},
+ {0x0b, 9}, {0x13, 10}, {0x12, 10}, {0x42, 12},
+ {0x80, 13}, {0x01, 4}, {0x03, 3}, {0x02, 3},
+ {0x03, 2}, {0x02, 2}, {0x01, 3}, {0x02, 6},
+ {0x22, 11}, {0x41, 12}
+ },
+ {
+ {0x43, 12}, {0x05, 6}, {0x07, 8}, {0x04, 6},
+ {0x03, 6}, {0x13, 10}, {0x42, 12}, {0x05, 7},
+ {0x04, 7}, {0x06, 8}, {0x12, 10}, {0x41, 12},
+ {0x40, 12}, {0x03, 5}, {0x03, 4}, {0x03, 3},
+ {0x02, 3}, {0x03, 2}, {0x02, 2}, {0x02, 4},
+ {0x05, 8}, {0x11, 10}
+ },
+ {
+ {0x83, 13}, {0x05, 7}, {0x07, 8}, {0x03, 4},
+ {0x21, 11}, {0x82, 13}, {0x81, 13}, {0x04, 7},
+ {0x06, 8}, {0x0b, 9}, {0x0a, 9}, {0x11, 10},
+ {0x80, 13}, {0x03, 5}, {0x02, 5}, {0x02, 4},
+ {0x03, 3}, {0x02, 3}, {0x03, 2}, {0x02, 2},
+ {0x03, 6}, {0x09, 9}
+ },
+ {
+ {0x13, 10}, {0x03, 5}, {0x03, 6}, {0x0d, 9},
+ {0x0c, 9}, {0x21, 11}, {0x20, 11}, {0x02, 5},
+ {0x02, 6}, {0x07, 8}, {0x0b, 9}, {0x12, 10},
+ {0x11, 10}, {0x05, 3}, {0x04, 3}, {0x05, 4},
+ {0x04, 4}, {0x03, 4}, {0x02, 4}, {0x03, 3},
+ {0x03, 2}, {0x0a, 9}
+ }
+};
+
#endif /* AVCODEC_MPEG4DATA_H */