mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-30 12:44:07 +00:00
Fix access unit delimiter.
- The nal header was written after the pic_type.
This commit is contained in:
parent
9584cd7352
commit
69d1059602
|
@ -28,20 +28,16 @@
|
||||||
#include "nal.h"
|
#include "nal.h"
|
||||||
|
|
||||||
|
|
||||||
static void encoder_state_write_bitstream_access_unit_delimiter(encoder_state_t * const state)
|
static void encoder_state_write_bitstream_aud(encoder_state_t * const state)
|
||||||
{
|
{
|
||||||
bitstream_t * const stream = &state->stream;
|
bitstream_t * const stream = &state->stream;
|
||||||
|
kvz_nal_write(stream, AUD_NUT, 0, 1);
|
||||||
|
|
||||||
uint8_t pic_type = state->global->slicetype == SLICE_I ? 0
|
uint8_t pic_type = state->global->slicetype == SLICE_I ? 0
|
||||||
: state->global->slicetype == SLICE_P ? 1
|
: state->global->slicetype == SLICE_P ? 1
|
||||||
: 2;
|
: 2;
|
||||||
WRITE_U(stream, pic_type, 3, "pic_type");
|
WRITE_U(stream, pic_type, 3, "pic_type");
|
||||||
}
|
|
||||||
|
|
||||||
static void encoder_state_write_bitstream_aud(encoder_state_t * const state)
|
|
||||||
{
|
|
||||||
bitstream_t * const stream = &state->stream;
|
|
||||||
encoder_state_write_bitstream_access_unit_delimiter(state);
|
|
||||||
kvz_nal_write(stream, AUD_NUT, 0, 1);
|
|
||||||
kvz_bitstream_add_rbsp_trailing_bits(stream);
|
kvz_bitstream_add_rbsp_trailing_bits(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue