summaryrefslogtreecommitdiff
path: root/libavcodec/avs2_parser.c
diff options
context:
space:
mode:
authorhwren <hwrenx@126.com>2020-08-20 14:47:42 +0800
committerhwren <hwrenx@126.com>2020-10-06 00:01:34 +0800
commit026be690e65c18bfb30413c0bc31e3a92ec5dcc6 (patch)
treeb938e05d9571e1106924c2aa2271f6d9f99f012c /libavcodec/avs2_parser.c
parentc952db9d68d31d1eca5ac770cc53bf35b885b087 (diff)
downloadffmpeg-026be690e65c18bfb30413c0bc31e3a92ec5dcc6.tar.gz
lavc/avs2_parser.c,lavf/davs2.c: add AVS2_* prefix
Add AVS2_* prefix to macro definitions to avoid confusion Signed-off-by: hwren <hwrenx@126.com>
Diffstat (limited to 'libavcodec/avs2_parser.c')
-rw-r--r--libavcodec/avs2_parser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/avs2_parser.c b/libavcodec/avs2_parser.c
index 1c9b3423ff..02af08f079 100644
--- a/libavcodec/avs2_parser.c
+++ b/libavcodec/avs2_parser.c
@@ -21,10 +21,10 @@
#include "parser.h"
-#define SLICE_MAX_START_CODE 0x000001af
+#define AVS2_SLICE_MAX_START_CODE 0x000001AF
-#define ISPIC(x) ((x) == 0xB3 || (x) == 0xB6)
-#define ISUNIT(x) ((x) == 0xB0 || (x) == 0xB1 || (x) == 0xB2 || ISPIC(x))
+#define AVS2_ISPIC(x) ((x) == 0xB3 || (x) == 0xB6)
+#define AVS2_ISUNIT(x) ((x) == 0xB0 || (x) == 0xB1 || (x) == 0xB2 || AVS2_ISPIC(x))
static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
{
@@ -35,7 +35,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz
if (!pic_found) {
for (; cur < buf_size; ++cur) {
state = (state<<8) | buf[cur];
- if (ISUNIT(buf[cur])){
+ if (AVS2_ISUNIT(buf[cur])){
++cur;
pic_found = 1;
break;
@@ -48,7 +48,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz
return END_NOT_FOUND;
for (; cur < buf_size; ++cur) {
state = (state << 8) | buf[cur];
- if ((state & 0xFFFFFF00) == 0x100 && state > SLICE_MAX_START_CODE) {
+ if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) {
pc->frame_start_found = 0;
pc->state = -1;
return cur - 3;