#include <stdio.h>#include <stdlib.h>#include "common.h"#include "mem.h"#include "bitstream.h"

Go to the source code of this file.
Defines | |
| #define | BUFSIZE 4096 |
Functions | |
| int | refill_buffer (Bit_stream_struc *bs) |
| void | empty_buffer (Bit_stream_struc *bs, int minimum) |
| void | open_bit_stream_w (Bit_stream_struc *bs, char *bs_filenam, int size) |
| void | close_bit_stream_w (Bit_stream_struc *bs) |
| void | alloc_buffer (Bit_stream_struc *bs, int size) |
| void | desalloc_buffer (Bit_stream_struc *bs) |
| void | back_track_buffer (Bit_stream_struc *bs, int N) |
| void | put1bit (Bit_stream_struc *bs, int bit) |
| INLINE void | putbits (Bit_stream_struc *bs, unsigned int val, int N) |
| void | byte_ali_putbits (Bit_stream_struc *bs, unsigned int val, int N) |
| unsigned long | sstell (Bit_stream_struc *bs) |
| int | end_bs (Bit_stream_struc *bs) |
| unsigned long | hsstell () |
| void | hputbuf (unsigned int val, int N) |
Variables | |
| int | minimum = MINIMUM |
| int | putmask [9] = { 0x0, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff } |
| int | clearmask [9] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x0 } |
| int | mask [8] = { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 } |
| static unsigned long | offset |
| static unsigned long | totbit = 0 |
| static unsigned int | buf [BUFSIZE] |
| #define BUFSIZE 4096 |
Definition at line 261 of file bitstream.c.
| void alloc_buffer | ( | Bit_stream_struc * | bs, | |
| int | size | |||
| ) |
Definition at line 147 of file bitstream.c.
References bit_stream_struc::buf, bit_stream_struc::buf_size, and mem_alloc().
Referenced by open_bit_stream_w().

| void back_track_buffer | ( | Bit_stream_struc * | bs, | |
| int | N | |||
| ) |
Definition at line 163 of file bitstream.c.
References bit_stream_struc::buf, bit_stream_struc::buf_bit_idx, bit_stream_struc::buf_byte_idx, clearmask, and bit_stream_struc::totbit.
| void byte_ali_putbits | ( | Bit_stream_struc * | bs, | |
| unsigned int | val, | |||
| int | N | |||
| ) |
Definition at line 227 of file bitstream.c.
References fprintf, MAX_LENGTH, putbits(), and sstell().

| void close_bit_stream_w | ( | Bit_stream_struc * | bs | ) |
Definition at line 138 of file bitstream.c.
References bit_stream_struc::buf_byte_idx, desalloc_buffer(), empty_buffer(), fclose(), bit_stream_struc::pt, and putbits().
Referenced by toolame().

| void desalloc_buffer | ( | Bit_stream_struc * | bs | ) |
Definition at line 155 of file bitstream.c.
References bit_stream_struc::buf.
Referenced by close_bit_stream_w().
| void empty_buffer | ( | Bit_stream_struc * | bs, | |
| int | minimum | |||
| ) |
Definition at line 103 of file bitstream.c.
References bit_stream_struc::buf, bit_stream_struc::buf_bit_idx, bit_stream_struc::buf_byte_idx, bit_stream_struc::buf_size, fwrite(), and bit_stream_struc::pt.
Referenced by close_bit_stream_w(), put1bit(), and putbits().

| int end_bs | ( | Bit_stream_struc * | bs | ) |
| void hputbuf | ( | unsigned int | val, | |
| int | N | |||
| ) |
| unsigned long hsstell | ( | void | ) |
| void open_bit_stream_w | ( | Bit_stream_struc * | bs, | |
| char * | bs_filenam, | |||
| int | size | |||
| ) |
Definition at line 120 of file bitstream.c.
References alloc_buffer(), bit_stream_struc::buf_bit_idx, bit_stream_struc::buf_byte_idx, bit_stream_struc::eob, bit_stream_struc::eobs, FALSE, fopen(), fprintf, bit_stream_struc::mode, NULL, bit_stream_struc::pt, bit_stream_struc::totbit, and WRITE_MODE.
Referenced by parse_args().

| void put1bit | ( | Bit_stream_struc * | bs, | |
| int | bit | |||
| ) |
Definition at line 185 of file bitstream.c.
References bit_stream_struc::buf, bit_stream_struc::buf_bit_idx, bit_stream_struc::buf_byte_idx, empty_buffer(), minimum, and bit_stream_struc::totbit.
Referenced by encode_info(), toolame(), and write_header().

| INLINE void putbits | ( | Bit_stream_struc * | bs, | |
| unsigned int | val, | |||
| int | N | |||
| ) |
Definition at line 201 of file bitstream.c.
References bit_stream_struc::buf, bit_stream_struc::buf_bit_idx, bit_stream_struc::buf_byte_idx, empty_buffer(), MIN, minimum, putmask, and bit_stream_struc::totbit.

| int refill_buffer | ( | Bit_stream_struc * | bs | ) |
Definition at line 44 of file bitstream.c.
References BINARY, bit_stream_struc::buf, bit_stream_struc::buf_byte_idx, bit_stream_struc::buf_size, bit_stream_struc::eob, bit_stream_struc::format, fread(), and bit_stream_struc::pt.

| unsigned long sstell | ( | Bit_stream_struc * | bs | ) |
Definition at line 242 of file bitstream.c.
References bit_stream_struc::totbit.
Referenced by byte_ali_putbits(), and toolame().
unsigned int buf[BUFSIZE] [static] |
Definition at line 263 of file bitstream.c.
Referenced by a52_imdct_512(), avcodec_default_free_buffers(), avcodec_default_get_buffer(), avcodec_default_release_buffer(), bufalloc(), calculate_vissual_weight(), compute_imdct(), compute_stats(), decode_mb_cavlc(), decode_user_data(), deinterlace_bottom_field_inplace(), do_video_out(), dts_decode_frame(), find_rtp_session_with_url(), foveon_thumb(), get_level_prefix(), get_prefix(), get_se_golomb(), get_ue_golomb(), get_ur_golomb(), get_ur_golomb_jpegls(), hputbuf(), kodak_65000_load_raw(), kodak_jpeg_load_raw(), kodak_radc_load_raw(), kodak_rgb_load_raw(), kodak_ycbcr_load_raw(), open_input_stream(), parse_makernote(), parse_tiff_ifd(), pre_process_video_frame(), print_report(), roqvideo_decode_frame(), rtsp_cmd_setup(), show_help_options(), slice_decode_thread(), svq3_get_se_golomb(), svq3_get_ue_golomb(), BC_Bitmap::transparency_bitswap(), video_decode_example(), and vorbis_parse_audio_packet().
| int clearmask[9] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x0 } |
| int mask[8] = { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 } |
Definition at line 182 of file bitstream.c.
| int minimum = MINIMUM |
Definition at line 43 of file bitstream.c.
unsigned long offset [static] |
Definition at line 262 of file bitstream.c.
| int putmask[9] = { 0x0, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff } |
unsigned long totbit = 0 [static] |
1.5.5