Commit 0f782355 authored by François Cartegnie's avatar François Cartegnie 🤞

packetizer: av1: complete and use canonical names for frame type

parent 028c89ad
......@@ -314,8 +314,18 @@ static block_t *ParseOBUBlock(decoder_t *p_dec, block_t *p_obu)
if((p_sys->i_seen & AV1_OBU_TEMPORAL_DELIMITER) && p_sys->tu.b_has_visible_frame)
p_output = OutputQueues(p_dec, p_sys->p_sequence_header != NULL);
if(AV1_get_frame_type(p_fh) == AV1_KEY_FRAME)
p_obu->i_flags |= BLOCK_FLAG_TYPE_I;
switch(AV1_get_frame_type(p_fh))
{
case AV1_FRAME_TYPE_KEY:
case AV1_FRAME_TYPE_INTRA_ONLY:
p_obu->i_flags |= BLOCK_FLAG_TYPE_I;
break;
case AV1_FRAME_TYPE_INTER:
p_obu->i_flags |= BLOCK_FLAG_TYPE_P;
break;
default:
break;
}
p_sys->tu.b_has_visible_frame |= AV1_get_frame_visibility(p_fh);
AV1_release_frame_header(p_fh);
......
......@@ -421,7 +421,7 @@ static bool av1_parse_uncompressed_header(bs_t *p_bs, struct av1_uncompressed_he
{
if(p_seq->reduced_still_picture_header)
{
p_uh->frame_type = AV1_KEY_FRAME;
p_uh->frame_type = AV1_FRAME_TYPE_KEY;
p_uh->show_frame = 1;
}
else
......
......@@ -174,10 +174,10 @@ bool AV1_get_frame_rate(const av1_OBU_sequence_header_t *, unsigned *, unsigned
typedef struct av1_OBU_frame_header_t av1_OBU_frame_header_t;
enum av1_frame_type_e
{
AV1_KEY_FRAME = 0,
AV1_INTER_FRAME = 1,
AV1_INTRA_ONLY_FRAME = 2,
AV1_SWITCH_FRAME = 3,
AV1_FRAME_TYPE_KEY = 0,
AV1_FRAME_TYPE_INTER = 1,
AV1_FRAME_TYPE_INTRA_ONLY = 2,
AV1_FRAME_TYPE_SWITCH = 3,
};
av1_OBU_frame_header_t * AV1_OBU_parse_frame_header(const uint8_t *p_data, size_t i_data,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment