chromium/third_party/libvpx/source/libvpx/vpx_dsp/bitwriter.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_VPX_DSP_BITWRITER_H_
#define VPX_VPX_DSP_BITWRITER_H_

#include <stdio.h>

#include "vpx_ports/compiler_attributes.h"
#include "vpx_ports/mem.h"

#include "vpx_dsp/prob.h"
#if CONFIG_BITSTREAM_DEBUG
#include "vpx_util/vpx_debug_util.h"
#endif  // CONFIG_BITSTREAM_DEBUG

#ifdef __cplusplus
extern "C" {
#endif

vpx_writer;

void vpx_start_encode(vpx_writer *br, uint8_t *source, size_t size);
// Returns 0 on success and returns -1 in case of error.
int vpx_stop_encode(vpx_writer *br);

static INLINE VPX_NO_UNSIGNED_SHIFT_CHECK void vpx_write(vpx_writer *br,
                                                         int bit,
                                                         int probability) {}

static INLINE void vpx_write_bit(vpx_writer *w, int bit) {}

static INLINE void vpx_write_literal(vpx_writer *w, int data, int bits) {}

#define vpx_write_prob(w, v)

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

#endif  // VPX_VPX_DSP_BITWRITER_H_