#include "hmm.h"
#include "ia_css_frame.h"
#include <math_support.h>
#include "assert_support.h"
#include "ia_css_debug.h"
#include "isp.h"
#include "sh_css_internal.h"
#include "atomisp_internal.h"
#define NV12_TILEY_TILE_WIDTH …
#define NV12_TILEY_TILE_HEIGHT …
static void frame_init_plane(struct ia_css_frame_plane *plane,
unsigned int width,
unsigned int stride,
unsigned int height,
unsigned int offset);
static void frame_init_single_plane(struct ia_css_frame *frame,
struct ia_css_frame_plane *plane,
unsigned int height,
unsigned int subpixels_per_line,
unsigned int bytes_per_pixel);
static void frame_init_raw_single_plane(
struct ia_css_frame *frame,
struct ia_css_frame_plane *plane,
unsigned int height,
unsigned int subpixels_per_line,
unsigned int bits_per_pixel);
static void frame_init_nv_planes(struct ia_css_frame *frame,
unsigned int horizontal_decimation,
unsigned int vertical_decimation,
unsigned int bytes_per_element);
static void frame_init_yuv_planes(struct ia_css_frame *frame,
unsigned int horizontal_decimation,
unsigned int vertical_decimation,
bool swap_uv,
unsigned int bytes_per_element);
static void frame_init_rgb_planes(struct ia_css_frame *frame,
unsigned int bytes_per_element);
static void frame_init_qplane6_planes(struct ia_css_frame *frame);
static int frame_allocate_buffer_data(struct ia_css_frame *frame);
static int frame_allocate_with_data(struct ia_css_frame **frame,
unsigned int width,
unsigned int height,
enum ia_css_frame_format format,
unsigned int padded_width,
unsigned int raw_bit_depth);
static struct ia_css_frame *frame_create(unsigned int width,
unsigned int height,
enum ia_css_frame_format format,
unsigned int padded_width,
unsigned int raw_bit_depth,
bool valid);
static unsigned
ia_css_elems_bytes_from_info(
const struct ia_css_frame_info *info);
int ia_css_frame_allocate_from_info(struct ia_css_frame **frame,
const struct ia_css_frame_info *info)
{ … }
int ia_css_frame_allocate(struct ia_css_frame **frame,
unsigned int width,
unsigned int height,
enum ia_css_frame_format format,
unsigned int padded_width,
unsigned int raw_bit_depth)
{ … }
void ia_css_frame_free(struct ia_css_frame *frame)
{ … }
int ia_css_frame_check_info(const struct ia_css_frame_info *info)
{ … }
int ia_css_frame_init_planes(struct ia_css_frame *frame)
{ … }
unsigned int ia_css_frame_pad_width(unsigned int width, enum ia_css_frame_format format)
{ … }
void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
unsigned int width,
unsigned int min_padded_width)
{ … }
void ia_css_frame_info_set_format(struct ia_css_frame_info *info,
enum ia_css_frame_format format)
{ … }
void ia_css_frame_info_init(struct ia_css_frame_info *info,
unsigned int width,
unsigned int height,
enum ia_css_frame_format format,
unsigned int aligned)
{ … }
void ia_css_frame_free_multiple(unsigned int num_frames,
struct ia_css_frame **frames_array)
{ … }
int ia_css_frame_allocate_with_buffer_size(struct ia_css_frame **frame,
const unsigned int buffer_size_bytes)
{ … }
bool ia_css_frame_info_is_same_resolution(
const struct ia_css_frame_info *info_a,
const struct ia_css_frame_info *info_b)
{ … }
bool ia_css_frame_is_same_type(const struct ia_css_frame *frame_a,
const struct ia_css_frame *frame_b)
{ … }
int ia_css_dma_configure_from_info(struct dma_port_config *config,
const struct ia_css_frame_info *info)
{ … }
static void frame_init_plane(struct ia_css_frame_plane *plane,
unsigned int width,
unsigned int stride,
unsigned int height,
unsigned int offset)
{ … }
static void frame_init_single_plane(struct ia_css_frame *frame,
struct ia_css_frame_plane *plane,
unsigned int height,
unsigned int subpixels_per_line,
unsigned int bytes_per_pixel)
{ … }
static void frame_init_raw_single_plane(
struct ia_css_frame *frame,
struct ia_css_frame_plane *plane,
unsigned int height,
unsigned int subpixels_per_line,
unsigned int bits_per_pixel)
{ … }
static void frame_init_nv_planes(struct ia_css_frame *frame,
unsigned int horizontal_decimation,
unsigned int vertical_decimation,
unsigned int bytes_per_element)
{ … }
static void frame_init_yuv_planes(struct ia_css_frame *frame,
unsigned int horizontal_decimation,
unsigned int vertical_decimation,
bool swap_uv,
unsigned int bytes_per_element)
{ … }
static void frame_init_rgb_planes(struct ia_css_frame *frame,
unsigned int bytes_per_element)
{ … }
static void frame_init_qplane6_planes(struct ia_css_frame *frame)
{ … }
static int frame_allocate_buffer_data(struct ia_css_frame *frame)
{ … }
static int frame_allocate_with_data(struct ia_css_frame **frame,
unsigned int width,
unsigned int height,
enum ia_css_frame_format format,
unsigned int padded_width,
unsigned int raw_bit_depth)
{ … }
static struct ia_css_frame *frame_create(unsigned int width,
unsigned int height,
enum ia_css_frame_format format,
unsigned int padded_width,
unsigned int raw_bit_depth,
bool valid)
{ … }
static unsigned
ia_css_elems_bytes_from_info(const struct ia_css_frame_info *info)
{ … }
void ia_css_frame_info_to_frame_sp_info(
struct ia_css_frame_sp_info *to,
const struct ia_css_frame_info *from)
{ … }
void ia_css_resolution_to_sp_resolution(
struct ia_css_sp_resolution *to,
const struct ia_css_resolution *from)
{ … }
int ia_css_frame_init_from_info(struct ia_css_frame *frame,
const struct ia_css_frame_info *frame_info)
{ … }