linux/drivers/media/pci/tw5864/tw5864-h264.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  TW5864 driver - H.264 headers generation functions
 *
 *  Copyright (C) 2016 Bluecherry, LLC <[email protected]>
 */

#include <linux/log2.h>

#include "tw5864.h"

static u8 marker[] =;

/*
 * Exponential-Golomb coding functions
 *
 * These functions are used for generation of H.264 bitstream headers.
 *
 * This code is derived from tw5864 reference driver by manufacturers, which
 * itself apparently was derived from x264 project.
 */

/* Bitstream writing context */
struct bs {};

static void bs_init(struct bs *s, void *buf, int size)
{}

static int bs_len(struct bs *s)
{}

static void bs_write(struct bs *s, int count, u32 bits)
{}

static void bs_write1(struct bs *s, u32 bit)
{}

static void bs_write_ue(struct bs *s, u32 val)
{}

static void bs_write_se(struct bs *s, int val)
{}

static void bs_rbsp_trailing(struct bs *s)
{}

/* H.264 headers generation functions */

static int tw5864_h264_gen_sps_rbsp(u8 *buf, size_t size, int width, int height)
{}

static int tw5864_h264_gen_pps_rbsp(u8 *buf, size_t size, int qp)
{}

static int tw5864_h264_gen_slice_head(u8 *buf, size_t size,
				      unsigned int idr_pic_id,
				      unsigned int frame_gop_seqno,
				      int *tail_nb_bits, u8 *tail)
{}

void tw5864_h264_put_stream_header(u8 **buf, size_t *space_left, int qp,
				   int width, int height)
{}

void tw5864_h264_put_slice_header(u8 **buf, size_t *space_left,
				  unsigned int idr_pic_id,
				  unsigned int frame_gop_seqno,
				  int *tail_nb_bits, u8 *tail)
{}