linux/drivers/media/platform/chips-media/coda/coda-h264.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Coda multi-standard codec IP - H.264 helper functions
 *
 * Copyright (C) 2012 Vista Silicon S.L.
 *    Javier Martin, <[email protected]>
 *    Xavier Duret
 */

#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/videodev2.h>

#include "coda.h"

static const u8 coda_filler_size[8] =;

static const u8 *coda_find_nal_header(const u8 *buf, const u8 *end)
{}

int coda_sps_parse_profile(struct coda_ctx *ctx, struct vb2_buffer *vb)
{}

int coda_h264_filler_nal(int size, char *p)
{}

int coda_h264_padding(int size, char *p)
{}

int coda_h264_profile(int profile_idc)
{}

int coda_h264_level(int level_idc)
{}

struct rbsp {};

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

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

static inline int rbsp_read_bits(struct rbsp *rbsp, int num, int *val)
{}

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

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

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

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

/**
 * coda_h264_sps_fixup - fixes frame cropping values in h.264 SPS
 * @ctx: encoder context
 * @width: visible width
 * @height: visible height
 * @buf: buffer containing h.264 SPS RBSP, starting with NAL header
 * @size: modified RBSP size return value
 * @max_size: available size in buf
 *
 * Rewrites the frame cropping values in an h.264 SPS RBSP correctly for the
 * given visible width and height.
 */
int coda_h264_sps_fixup(struct coda_ctx *ctx, int width, int height, char *buf,
			int *size, int max_size)
{}