/kernel/linux/linux-6.6/drivers/media/platform/allegro-dvt/ |
H A D | nal-hevc.c | 25 #include "nal-rbsp.h" 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 *rbs argument 74 nal_hevc_write_filler_data(struct rbsp *rbsp) nal_hevc_write_filler_data() argument 85 nal_hevc_read_filler_data(struct rbsp *rbsp) nal_hevc_read_filler_data() argument 100 nal_hevc_rbsp_profile_tier_level(struct rbsp *rbsp, struct nal_hevc_profile_tier_level *ptl) nal_hevc_rbsp_profile_tier_level() argument 177 nal_hevc_rbsp_vps(struct rbsp *rbsp, struct nal_hevc_vps *vps) nal_hevc_rbsp_vps() argument 210 nal_hevc_rbsp_sub_layer_hrd_parameters(struct rbsp *rbsp, struct nal_hevc_sub_layer_hrd_parameters *hrd) nal_hevc_rbsp_sub_layer_hrd_parameters() argument 223 nal_hevc_rbsp_hrd_parameters(struct rbsp *rbsp, struct nal_hevc_hrd_parameters *hrd) nal_hevc_rbsp_hrd_parameters() argument 264 nal_hevc_rbsp_vui_parameters(struct rbsp *rbsp, struct nal_hevc_vui_parameters *vui) nal_hevc_rbsp_vui_parameters() argument 340 nal_hevc_rbsp_sps(struct rbsp *rbsp, struct nal_hevc_sps *sps) nal_hevc_rbsp_sps() argument 430 nal_hevc_rbsp_pps(struct rbsp *rbsp, struct nal_hevc_pps *pps) nal_hevc_rbsp_pps() argument 522 struct rbsp rbsp; nal_hevc_write_vps() local 566 struct rbsp rbsp; nal_hevc_read_vps() local 617 struct rbsp rbsp; nal_hevc_write_sps() local 661 struct rbsp rbsp; nal_hevc_read_sps() local 712 struct rbsp rbsp; nal_hevc_write_pps() local 756 struct rbsp rbsp; nal_hevc_read_pps() local 805 struct rbsp rbsp; nal_hevc_write_filler() local 852 struct rbsp rbsp; nal_hevc_read_filler() local [all...] |
H A D | nal-h264.c | 25 #include "nal-rbsp.h" 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 *rbs argument 73 nal_h264_write_filler_data(struct rbsp *rbsp) nal_h264_write_filler_data() argument 84 nal_h264_read_filler_data(struct rbsp *rbsp) nal_h264_read_filler_data() argument 99 nal_h264_rbsp_hrd_parameters(struct rbsp *rbsp, struct nal_h264_hrd_parameters *hrd) nal_h264_rbsp_hrd_parameters() argument 125 nal_h264_rbsp_vui_parameters(struct rbsp *rbsp, struct nal_h264_vui_parameters *vui) nal_h264_rbsp_vui_parameters() argument 198 nal_h264_rbsp_sps(struct rbsp *rbsp, struct nal_h264_sps *sps) nal_h264_rbsp_sps() argument 283 nal_h264_rbsp_pps(struct rbsp *rbsp, struct nal_h264_pps *pps) nal_h264_rbsp_pps() argument 356 struct rbsp rbsp; nal_h264_write_sps() local 397 struct rbsp rbsp; nal_h264_read_sps() local 447 struct rbsp rbsp; nal_h264_write_pps() local 489 struct rbsp rbsp; nal_h264_read_pps() local 531 struct rbsp rbsp; nal_h264_write_filler() local 574 struct rbsp rbsp; nal_h264_read_filler() local [all...] |
H A D | nal-rbsp.c | 17 #include "nal-rbsp.h" 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 *rbs argument 48 add_emulation_prevention_three_byte(struct rbsp *rbsp) add_emulation_prevention_three_byte() argument 56 discard_emulation_prevention_three_byte(struct rbsp *rbsp) discard_emulation_prevention_three_byte() argument 68 rbsp_read_bit(struct rbsp *rbsp) rbsp_read_bit() argument 99 rbsp_write_bit(struct rbsp *rbsp, bool value) rbsp_write_bit() argument 127 rbsp_read_bits(struct rbsp *rbsp, int n, unsigned int *value) rbsp_read_bits() argument 149 rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int value) rbsp_write_bits() argument 165 rbsp_read_uev(struct rbsp *rbsp, unsigned int *value) rbsp_read_uev() argument 188 rbsp_write_uev(struct rbsp *rbsp, unsigned int *value) rbsp_write_uev() argument 205 rbsp_read_sev(struct rbsp *rbsp, int *value) rbsp_read_sev() argument 224 rbsp_write_sev(struct rbsp *rbsp, int *value) rbsp_write_sev() argument 239 __rbsp_write_bit(struct rbsp *rbsp, int *value) __rbsp_write_bit() argument 244 __rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int *value) __rbsp_write_bits() argument 256 __rbsp_read_bit(struct rbsp *rbsp, int *value) __rbsp_read_bit() argument 274 rbsp_bit(struct rbsp *rbsp, int *value) rbsp_bit() argument 281 rbsp_bits(struct rbsp *rbsp, int n, int *value) rbsp_bits() argument 288 rbsp_uev(struct rbsp *rbsp, unsigned int *value) rbsp_uev() argument 295 rbsp_sev(struct rbsp *rbsp, int *value) rbsp_sev() argument 302 rbsp_trailing_bits(struct rbsp *rbsp) rbsp_trailing_bits() argument [all...] |
H A 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); 22 * struct rbsp 38 struct rbsp { global() struct [all...] |
H A D | Makefile | 4 allegro-objs += nal-rbsp.o nal-h264.o nal-hevc.o
|
/kernel/linux/linux-5.10/drivers/staging/media/allegro-dvt/ |
H A D | nal-h264.c | 36 struct rbsp; 39 int (*rbsp_bit)(struct rbsp *rbsp, int *val); 40 int (*rbsp_bits)(struct rbsp *rbsp, int n, unsigned int *val); 41 int (*rbsp_uev)(struct rbsp *rbsp, unsigned int *val); 42 int (*rbsp_sev)(struct rbsp *rbsp, int *val); 46 * struct rbsp 62 struct rbsp { global() struct 71 rbsp_init(struct rbsp *rbsp, void *addr, size_t size, struct nal_h264_ops *ops) rbsp_init() argument 169 add_emulation_prevention_three_byte(struct rbsp *rbsp) add_emulation_prevention_three_byte() argument 177 discard_emulation_prevention_three_byte(struct rbsp *rbsp) discard_emulation_prevention_three_byte() argument 189 rbsp_read_bit(struct rbsp *rbsp) rbsp_read_bit() argument 220 rbsp_write_bit(struct rbsp *rbsp, bool value) rbsp_write_bit() argument 248 rbsp_read_bits(struct rbsp *rbsp, int n, unsigned int *value) rbsp_read_bits() argument 270 rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int value) rbsp_write_bits() argument 286 rbsp_read_uev(struct rbsp *rbsp, unsigned int *value) rbsp_read_uev() argument 309 rbsp_write_uev(struct rbsp *rbsp, unsigned int *value) rbsp_write_uev() argument 326 rbsp_read_sev(struct rbsp *rbsp, int *value) rbsp_read_sev() argument 345 rbsp_write_sev(struct rbsp *rbsp, int *value) rbsp_write_sev() argument 360 __rbsp_write_bit(struct rbsp *rbsp, int *value) __rbsp_write_bit() argument 365 __rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int *value) __rbsp_write_bits() argument 377 __rbsp_read_bit(struct rbsp *rbsp, int *value) __rbsp_read_bit() argument 395 rbsp_bit(struct rbsp *rbsp, int *value) rbsp_bit() argument 402 rbsp_bits(struct rbsp *rbsp, int n, int *value) rbsp_bits() argument 409 rbsp_uev(struct rbsp *rbsp, unsigned int *value) rbsp_uev() argument 416 rbsp_sev(struct rbsp *rbsp, int *value) rbsp_sev() argument 423 nal_h264_rbsp_trailing_bits(struct rbsp *rbsp) nal_h264_rbsp_trailing_bits() argument 433 nal_h264_write_start_code_prefix(struct rbsp *rbsp) nal_h264_write_start_code_prefix() argument 451 nal_h264_read_start_code_prefix(struct rbsp *rbsp) nal_h264_read_start_code_prefix() argument 469 nal_h264_write_filler_data(struct rbsp *rbsp) nal_h264_write_filler_data() argument 480 nal_h264_read_filler_data(struct rbsp *rbsp) nal_h264_read_filler_data() argument 495 nal_h264_rbsp_hrd_parameters(struct rbsp *rbsp, struct nal_h264_hrd_parameters *hrd) nal_h264_rbsp_hrd_parameters() argument 521 nal_h264_rbsp_vui_parameters(struct rbsp *rbsp, struct nal_h264_vui_parameters *vui) nal_h264_rbsp_vui_parameters() argument 594 nal_h264_rbsp_sps(struct rbsp *rbsp, struct nal_h264_sps *sps) nal_h264_rbsp_sps() argument 679 nal_h264_rbsp_pps(struct rbsp *rbsp, struct nal_h264_pps *pps) nal_h264_rbsp_pps() argument 752 struct rbsp rbsp; nal_h264_write_sps() local 793 struct rbsp rbsp; nal_h264_read_sps() local 843 struct rbsp rbsp; nal_h264_write_pps() local 885 struct rbsp rbsp; nal_h264_read_pps() local 927 struct rbsp rbsp; nal_h264_write_filler() local 970 struct rbsp rbsp; nal_h264_read_filler() local [all...] |
/kernel/linux/linux-5.10/drivers/media/platform/coda/ |
H A D | coda-h264.c | 60 /* Add rbsp stop bit and trailing at the end */ in coda_h264_filler_nal() 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, in argument 146 rbsp_read_bits(struct rbsp *rbsp, int num, int *val) rbsp_read_bits() argument 167 rbsp_write_bits(struct rbsp *rbsp, int num, int value) rbsp_write_bits() argument 180 rbsp_read_uev(struct rbsp *rbsp, unsigned int *val) rbsp_read_uev() argument 203 rbsp_write_uev(struct rbsp *rbsp, unsigned int value) rbsp_write_uev() argument 219 rbsp_read_sev(struct rbsp *rbsp, int *val) rbsp_read_sev() argument [all...] |
/kernel/linux/linux-6.6/drivers/media/platform/chips-media/ |
H A D | coda-h264.c | 60 /* Add rbsp stop bit and trailing at the end */ in coda_h264_filler_nal() 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, in argument 146 rbsp_read_bits(struct rbsp *rbsp, int num, int *val) rbsp_read_bits() argument 167 rbsp_write_bits(struct rbsp *rbsp, int num, int value) rbsp_write_bits() argument 180 rbsp_read_uev(struct rbsp *rbsp, unsigned int *val) rbsp_read_uev() argument 203 rbsp_write_uev(struct rbsp *rbsp, unsigned int value) rbsp_write_uev() argument 219 rbsp_read_sev(struct rbsp *rbsp, int *val) rbsp_read_sev() argument [all...] |