Quoting Alexandra Hájková (2016-04-27 13:37:51)
> ---
> libavcodec/bitstream.h | 475
> +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 475 insertions(+)
> create mode 100644 libavcodec/bitstream.h
>
> diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
> new file mode 100644
> index 0000000..8793556
> --- /dev/null
> +++ b/libavcodec/bitstream.h
> @@ -0,0 +1,475 @@
> +/*
> + * copyright (c) 2016 Alexandra Hájková
> + *
> + * This file is part of Libav.
> + *
> + * Libav is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * Libav is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with Libav; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
> USA
> + */
> +
> +/**
> + * @file
> + * bitstream reader API header.
> + */
> +
> +#ifndef AVCODEC_BITSTREAM_H
> +#define AVCODEC_BITSTREAM_H
> +
> +#include <stdint.h>
> +
> +#include "libavutil/common.h"
> +#include "libavutil/intreadwrite.h"
> +#include "libavutil/log.h"
> +#include "mathops.h"
> +#include "vlc.h"
> +
> +typedef struct BitstreamContext {
> + uint64_t bits; // stores bits read from the buffer
> + const uint8_t *buffer, *buffer_end;
> + const uint8_t *ptr; // pointer to the position inside a buffer
> + unsigned bits_left; // number of bits left in bits field
> + int size_in_bits;
Why is this signed, while bits_left is unsigned?
--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel