Browse Source

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>
tags/n4.2
James Almer 6 years ago
parent
commit
45048ece81
4 changed files with 2 additions and 4 deletions
  1. +0
    -1
      libavcodec/cbs_h264.h
  2. +1
    -1
      libavcodec/cbs_h264_syntax_template.c
  3. +0
    -1
      libavcodec/cbs_h265.h
  4. +1
    -1
      libavcodec/cbs_h265_syntax_template.c

+ 0
- 1
libavcodec/cbs_h264.h 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;



+ 1
- 1
libavcodec/cbs_h264_syntax_template.c 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);



+ 0
- 1
libavcodec/cbs_h265.h 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;


+ 1
- 1
libavcodec/cbs_h265_syntax_template.c 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,


Loading…
Cancel
Save