chromium/third_party/libvpx/source/libvpx/vp8/common/onyx.h

/*
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef VPX_VP8_COMMON_ONYX_H_
#define VPX_VP8_COMMON_ONYX_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "vpx_config.h"
#include "vpx/internal/vpx_codec_internal.h"
#include "vpx/vp8cx.h"
#include "vpx/vpx_encoder.h"
#include "vpx_scale/yv12config.h"
#include "ppflags.h"

struct VP8_COMP;

/* Create/destroy static data structures. */

END_USAGE;

MODE;

FRAMETYPE_FLAGS;

#include <assert.h>
static INLINE void Scale2Ratio(int mode, int *hr, int *hs) {}

VP8_CONFIG;

void vp8_initialize(void);

struct VP8_COMP *vp8_create_compressor(const VP8_CONFIG *oxcf);
void vp8_remove_compressor(struct VP8_COMP **comp);

void vp8_init_config(struct VP8_COMP *onyx, VP8_CONFIG *oxcf);
void vp8_change_config(struct VP8_COMP *cpi, const VP8_CONFIG *oxcf);

int vp8_receive_raw_frame(struct VP8_COMP *cpi, unsigned int frame_flags,
                          YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
                          int64_t end_time);
int vp8_get_compressed_data(struct VP8_COMP *cpi, unsigned int *frame_flags,
                            size_t *size, unsigned char *dest,
                            unsigned char *dest_end, int64_t *time_stamp,
                            int64_t *time_end, int flush);
int vp8_get_preview_raw_frame(struct VP8_COMP *cpi, YV12_BUFFER_CONFIG *dest,
                              vp8_ppflags_t *flags);

int vp8_use_as_reference(struct VP8_COMP *cpi, int ref_frame_flags);
int vp8_update_reference(struct VP8_COMP *cpi, int ref_frame_flags);
int vp8_get_reference(struct VP8_COMP *cpi,
                      enum vpx_ref_frame_type ref_frame_flag,
                      YV12_BUFFER_CONFIG *sd);
int vp8_set_reference(struct VP8_COMP *cpi,
                      enum vpx_ref_frame_type ref_frame_flag,
                      YV12_BUFFER_CONFIG *sd);
int vp8_update_entropy(struct VP8_COMP *cpi, int update);
int vp8_set_roimap(struct VP8_COMP *cpi, unsigned char *map, unsigned int rows,
                   unsigned int cols, int delta_q[4], int delta_lf[4],
                   unsigned int threshold[4]);
int vp8_set_active_map(struct VP8_COMP *cpi, unsigned char *map,
                       unsigned int rows, unsigned int cols);
int vp8_set_internal_size(struct VP8_COMP *cpi, VPX_SCALING_MODE horiz_mode,
                          VPX_SCALING_MODE vert_mode);
int vp8_get_quantizer(struct VP8_COMP *cpi);

#ifdef __cplusplus
}
#endif

#endif  // VPX_VP8_COMMON_ONYX_H_