Searched refs:rbsp (Results 1 – 6 of 6) sorted by relevance
/linux-5.19.10/drivers/media/platform/allegro-dvt/ |
D | nal-hevc.c | 38 static void nal_hevc_write_start_code_prefix(struct rbsp *rbsp) in nal_hevc_write_start_code_prefix() argument 40 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_hevc_write_start_code_prefix() 43 if (DIV_ROUND_UP(rbsp->pos, 8) + i > rbsp->size) { in nal_hevc_write_start_code_prefix() 44 rbsp->error = -EINVAL; in nal_hevc_write_start_code_prefix() 53 rbsp->pos += i * 8; in nal_hevc_write_start_code_prefix() 56 static void nal_hevc_read_start_code_prefix(struct rbsp *rbsp) in nal_hevc_read_start_code_prefix() argument 58 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_hevc_read_start_code_prefix() 61 if (DIV_ROUND_UP(rbsp->pos, 8) + i > rbsp->size) { in nal_hevc_read_start_code_prefix() 62 rbsp->error = -EINVAL; in nal_hevc_read_start_code_prefix() 67 rbsp->error = -EINVAL; in nal_hevc_read_start_code_prefix() [all …]
|
D | nal-h264.c | 37 static void nal_h264_write_start_code_prefix(struct rbsp *rbsp) in nal_h264_write_start_code_prefix() argument 39 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_h264_write_start_code_prefix() 42 if (DIV_ROUND_UP(rbsp->pos, 8) + i > rbsp->size) { in nal_h264_write_start_code_prefix() 43 rbsp->error = -EINVAL; in nal_h264_write_start_code_prefix() 52 rbsp->pos += i * 8; in nal_h264_write_start_code_prefix() 55 static void nal_h264_read_start_code_prefix(struct rbsp *rbsp) in nal_h264_read_start_code_prefix() argument 57 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_h264_read_start_code_prefix() 60 if (DIV_ROUND_UP(rbsp->pos, 8) + i > rbsp->size) { in nal_h264_read_start_code_prefix() 61 rbsp->error = -EINVAL; in nal_h264_read_start_code_prefix() 66 rbsp->error = -EINVAL; in nal_h264_read_start_code_prefix() [all …]
|
D | nal-rbsp.c | 19 void rbsp_init(struct rbsp *rbsp, void *addr, size_t size, in rbsp_init() argument 22 if (!rbsp) in rbsp_init() 25 rbsp->data = addr; in rbsp_init() 26 rbsp->size = size; in rbsp_init() 27 rbsp->pos = 0; in rbsp_init() 28 rbsp->ops = ops; in rbsp_init() 29 rbsp->error = 0; in rbsp_init() 32 void rbsp_unsupported(struct rbsp *rbsp) in rbsp_unsupported() argument 34 rbsp->error = -EINVAL; in rbsp_unsupported() 37 static int rbsp_read_bits(struct rbsp *rbsp, int n, unsigned int *value); [all …]
|
D | nal-rbsp.h | 12 struct rbsp; 15 int (*rbsp_bit)(struct rbsp *rbsp, int *val); 16 int (*rbsp_bits)(struct rbsp *rbsp, int n, unsigned int *val); 17 int (*rbsp_uev)(struct rbsp *rbsp, unsigned int *val); 18 int (*rbsp_sev)(struct rbsp *rbsp, int *val); 38 struct rbsp { struct 50 void rbsp_init(struct rbsp *rbsp, void *addr, size_t size, argument 52 void rbsp_unsupported(struct rbsp *rbsp); 54 void rbsp_bit(struct rbsp *rbsp, int *value); 55 void rbsp_bits(struct rbsp *rbsp, int n, int *value); [all …]
|
D | Makefile | 4 allegro-objs += nal-rbsp.o nal-h264.o nal-hevc.o
|
/linux-5.19.10/drivers/media/platform/chips-media/ |
D | coda-h264.c | 115 struct rbsp { struct 121 static inline int rbsp_read_bit(struct rbsp *rbsp) in rbsp_read_bit() argument 123 int shift = 7 - (rbsp->pos % 8); in rbsp_read_bit() 124 int ofs = rbsp->pos++ / 8; in rbsp_read_bit() 126 if (ofs >= rbsp->size) in rbsp_read_bit() 129 return (rbsp->buf[ofs] >> shift) & 1; in rbsp_read_bit() 132 static inline int rbsp_write_bit(struct rbsp *rbsp, int bit) in rbsp_write_bit() argument 134 int shift = 7 - (rbsp->pos % 8); in rbsp_write_bit() 135 int ofs = rbsp->pos++ / 8; in rbsp_write_bit() 137 if (ofs >= rbsp->size) in rbsp_write_bit() [all …]
|