avcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit

This follows the spec definition, and removes a field from the relevant
structs.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2019-04-16 23:00:49 -03:00
parent 16c50abb50
commit 45048ece81
4 changed files with 2 additions and 4 deletions

View File

@ -38,7 +38,6 @@ enum {
typedef struct H264RawNALUnitHeader {
uint8_t forbidden_zero_bit;
uint8_t nal_ref_idc;
uint8_t nal_unit_type;

View File

@ -33,7 +33,7 @@ static int FUNC(nal_unit_header)(CodedBitstreamContext *ctx, RWContext *rw,
{
int err;
u(1, forbidden_zero_bit, 0, 0);
fixed(1, forbidden_zero_bit, 0);
ub(2, nal_ref_idc);
ub(5, nal_unit_type);

View File

@ -35,7 +35,6 @@ enum {
};
typedef struct H265RawNALUnitHeader {
uint8_t forbidden_zero_bit;
uint8_t nal_unit_type;
uint8_t nuh_layer_id;
uint8_t nuh_temporal_id_plus1;

View File

@ -33,7 +33,7 @@ static int FUNC(nal_unit_header)(CodedBitstreamContext *ctx, RWContext *rw,
{
int err;
u(1, forbidden_zero_bit, 0, 0);
fixed(1, forbidden_zero_bit, 0);
if (expected_nal_unit_type >= 0)
u(6, nal_unit_type, expected_nal_unit_type,