linux/drivers/media/platform/allegro-dvt/nal-rbsp.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2019-2020 Pengutronix, Michael Tretter <[email protected]>
 *
 * Helper functions to generate a raw byte sequence payload from values.
 */

#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/v4l2-controls.h>

#include <linux/device.h>
#include <linux/export.h>
#include <linux/log2.h>

#include "nal-rbsp.h"

void rbsp_init(struct rbsp *rbsp, void *addr, size_t size,
	       struct nal_rbsp_ops *ops)
{}

void rbsp_unsupported(struct rbsp *rbsp)
{}

static int rbsp_read_bits(struct rbsp *rbsp, int n, unsigned int *value);
static int rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int value);

/*
 * When reading or writing, the emulation_prevention_three_byte is detected
 * only when the 2 one bits need to be inserted. Therefore, we are not
 * actually adding the 0x3 byte, but the 2 one bits and the six 0 bits of the
 * next byte.
 */
#define EMULATION_PREVENTION_THREE_BYTE

static int add_emulation_prevention_three_byte(struct rbsp *rbsp)
{}

static int discard_emulation_prevention_three_byte(struct rbsp *rbsp)
{}

static inline int rbsp_read_bit(struct rbsp *rbsp)
{}

static inline int rbsp_write_bit(struct rbsp *rbsp, bool value)
{}

static inline int rbsp_read_bits(struct rbsp *rbsp, int n, unsigned int *value)
{}

static int rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int value)
{}

static int rbsp_read_uev(struct rbsp *rbsp, unsigned int *value)
{}

static int rbsp_write_uev(struct rbsp *rbsp, unsigned int *value)
{}

static int rbsp_read_sev(struct rbsp *rbsp, int *value)
{}

static int rbsp_write_sev(struct rbsp *rbsp, int *value)
{}

static int __rbsp_write_bit(struct rbsp *rbsp, int *value)
{}

static int __rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int *value)
{}

struct nal_rbsp_ops write =;

static int __rbsp_read_bit(struct rbsp *rbsp, int *value)
{}

struct nal_rbsp_ops read =;

void rbsp_bit(struct rbsp *rbsp, int *value)
{}

void rbsp_bits(struct rbsp *rbsp, int n, int *value)
{}

void rbsp_uev(struct rbsp *rbsp, unsigned int *value)
{}

void rbsp_sev(struct rbsp *rbsp, int *value)
{}

void rbsp_trailing_bits(struct rbsp *rbsp)
{}