Context |
Check |
Description |
yinshiyou/commit_msg_loongarch64 |
warning
|
The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
|
andriy/commit_msg_aarch64_jetson |
warning
|
The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
|
andriy/commit_msg_armv7_RPi4 |
warning
|
The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
|
andriy/make_aarch64_jetson |
success
|
Make finished
|
andriy/make_fate_aarch64_jetson |
success
|
Make fate finished
|
andriy/make_armv7_RPi4 |
success
|
Make finished
|
andriy/make_fate_armv7_RPi4 |
success
|
Make fate finished
|
@@ -35,6 +35,8 @@
#define AVS3_FIRST_SLICE_START_CODE 0x00
#define AVS3_PROFILE_BASELINE_MAIN 0x20
#define AVS3_PROFILE_BASELINE_MAIN10 0x22
+#define AVS3_PROFILE_BASELINE_HIGH 0x30
+#define AVS3_PROFILE_BASELINE_HIGH10 0x32
#define AVS3_ISPIC(x) ((x) == AVS3_INTRA_PIC_START_CODE || (x) == AVS3_INTER_PIC_START_CODE)
#define AVS3_ISUNIT(x) ((x) == AVS3_SEQ_START_CODE || AVS3_ISPIC(x))
@@ -91,11 +91,11 @@ static void parse_avs3_nal_units(AVCodecParserContext *s, const uint8_t *buf,
// sampe_precision(3)
skip_bits(&gb, 47);
- if (profile == AVS3_PROFILE_BASELINE_MAIN10) {
- int sample_precision = get_bits(&gb, 3);
- if (sample_precision == 1) {
+ if (profile == AVS3_PROFILE_BASELINE_MAIN10 || profile == AVS3_PROFILE_BASELINE_HIGH10) {
+ int encoding_precision = get_bits(&gb, 3);
+ if (encoding_precision == 1) {
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
- } else if (sample_precision == 2) {
+ } else if (encoding_precision == 2) {
avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE;
} else {
avctx->pix_fmt = AV_PIX_FMT_NONE;
@@ -47,7 +47,7 @@ static int avs3video_probe(const AVProbeData *p)
}
if (state == AVS3_SEQ_START_CODE) {
seq++;
- if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != AVS3_PROFILE_BASELINE_MAIN10)
+ if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != AVS3_PROFILE_BASELINE_MAIN10 && *ptr != AVS3_PROFILE_BASELINE_HIGH && *ptr != AVS3_PROFILE_BASELINE_HIGH10)
return 0;
} else if (AVS3_ISPIC(state)) {
pic++;
This patch adds high level syntax support for parsing AVS3 High profile bitstreams. Latest AVS3 specification including High profile is available at http://www.avs.org.cn/AVS3_download/en_index.asp Signed-off-by: Paul Higgs <paul_higgs@hotmail.com> --- libavcodec/avs3.h | 2 ++ libavcodec/avs3_parser.c | 8 ++++---- libavformat/avs3dec.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-)