chromium/third_party/libaom/source/libaom/aom_dsp/bitwriter.h

/*
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */

#ifndef AOM_AOM_DSP_BITWRITER_H_
#define AOM_AOM_DSP_BITWRITER_H_

#include <assert.h>

#include "config/aom_config.h"

#include "aom_dsp/entenc.h"
#include "aom_dsp/prob.h"

#if CONFIG_RD_DEBUG
#include "av1/common/blockd.h"
#include "av1/encoder/cost.h"
#endif

#if CONFIG_BITSTREAM_DEBUG
#include "aom_util/debug_util.h"
#endif  // CONFIG_BITSTREAM_DEBUG

#ifdef __cplusplus
extern "C" {
#endif

struct aom_writer {};

aom_writer;

TOKEN_STATS;

static inline void init_token_stats(TOKEN_STATS *token_stats) {}

void aom_start_encode(aom_writer *w, uint8_t *buffer);

// Returns a negative number on error. Caller must check the return value and
// handle error.
int aom_stop_encode(aom_writer *w);

int aom_tell_size(aom_writer *w);

static inline void aom_write(aom_writer *w, int bit, int probability) {}

static inline void aom_write_bit(aom_writer *w, int bit) {}

static inline void aom_write_literal(aom_writer *w, int data, int bits) {}

static inline void aom_write_cdf(aom_writer *w, int symb,
                                 const aom_cdf_prob *cdf, int nsymbs) {}

static inline void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf,
                                    int nsymbs) {}

#ifdef __cplusplus
}  // extern "C"
#endif

#endif  // AOM_AOM_DSP_BITWRITER_H_