Commit d4c2103b authored by Diego Biurrun's avatar Diego Biurrun

golomb: Convert to the new bitstream reader

parent ab87af41
......@@ -26,7 +26,7 @@
#include "bytestream.h"
#include "internal.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "idctdsp.h"
#include "thread.h"
#include "unary_legacy.h"
......
......@@ -27,7 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "h264chroma.h"
#include "idctdsp.h"
#include "internal.h"
......
......@@ -27,7 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "cavs.h"
#include "internal.h"
#include "mpeg12data.h"
......
......@@ -29,7 +29,7 @@
#include "avcodec.h"
#include "dirac.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "mpeg12data.h"
......
......@@ -31,12 +31,13 @@
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/timer.h"
#include "avcodec.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "rangecoder.h"
#include "golomb.h"
#include "mathops.h"
#include "ffv1.h"
......
......@@ -33,10 +33,10 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "put_bits.h"
#include "rangecoder.h"
#include "golomb.h"
#include "mathops.h"
#include "ffv1.h"
......
......@@ -22,10 +22,11 @@
*/
#include "libavutil/common.h"
#include "avcodec.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "get_bits.h"
#include "golomb.h"
typedef struct FICThreadContext {
DECLARE_ALIGNED(16, int16_t, block)[64];
......
......@@ -37,7 +37,7 @@
#include "internal.h"
#include "get_bits.h"
#include "bytestream.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "flac.h"
#include "flacdata.h"
#include "flacdsp.h"
......
......@@ -26,7 +26,7 @@
#include "avcodec.h"
#include "bswapdsp.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "lpc.h"
#include "flac.h"
......
This diff is collapsed.
This diff is collapsed.
......@@ -32,7 +32,7 @@
#include "h264dec.h"
#include "h264_mvpred.h"
#include "h264data.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "mpegutils.h"
#include <assert.h>
......
......@@ -18,7 +18,7 @@
#include "bytestream.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "h264.h"
#include "h264dec.h"
#include "h264_parse.h"
......
......@@ -36,7 +36,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "h264.h"
#include "h264_sei.h"
#include "h264_ps.h"
......
......@@ -28,12 +28,13 @@
#include <inttypes.h>
#include "libavutil/imgutils.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "mathops.h"
#include "avcodec.h"
#include "h264data.h"
#include "h264_ps.h"
#include "golomb.h"
#define MAX_LOG2_MAX_FRAME_NUM (12 + 4)
#define MIN_LOG2_MAX_FRAME_NUM 4
......
......@@ -27,11 +27,11 @@
#include <inttypes.h>
#include "golomb_legacy.h"
#include "internal.h"
#include "avcodec.h"
#include "h264.h"
#include "h264dec.h"
#include "golomb.h"
#include "mpegutils.h"
#include <assert.h>
......
......@@ -27,7 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "h264_ps.h"
#include "h264_sei.h"
#include "internal.h"
......
......@@ -34,6 +34,7 @@
#include "cabac.h"
#include "cabac_functions.h"
#include "error_resilience.h"
#include "golomb_legacy.h"
#include "avcodec.h"
#include "h264.h"
#include "h264dec.h"
......@@ -41,7 +42,6 @@
#include "h264chroma.h"
#include "h264_mvpred.h"
#include "h264_ps.h"
#include "golomb.h"
#include "mathops.h"
#include "mpegutils.h"
#include "rectangle.h"
......
......@@ -36,6 +36,7 @@
#include "cabac_functions.h"
#include "error_resilience.h"
#include "avcodec.h"
#include "golomb_legacy.h"
#include "h264.h"
#include "h264dec.h"
#include "h2645_parse.h"
......@@ -43,7 +44,6 @@
#include "h264chroma.h"
#include "h264_mvpred.h"
#include "h264_ps.h"
#include "golomb.h"
#include "mathops.h"
#include "me_cmp.h"
#include "mpegutils.h"
......
......@@ -22,7 +22,7 @@
#include "libavutil/common.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "hevc.h"
#include "hevcdec.h"
#include "h2645_parse.h"
......
......@@ -25,7 +25,7 @@
#include "libavutil/imgutils.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "hevc_data.h"
#include "hevc_ps.h"
......
......@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "golomb.h"
#include "golomb_legacy.h"
#include "hevc_ps.h"
#include "put_bits.h"
......
......@@ -22,7 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "golomb.h"
#include "golomb_legacy.h"
#include "hevcdec.h"
enum HEVC_SEI_TYPE {
......
......@@ -35,7 +35,7 @@
#include "bswapdsp.h"
#include "bytestream.h"
#include "cabac_functions.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "hevc.h"
#include "hevc_data.h"
#include "hevcdec.h"
......
......@@ -27,7 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "mathops.h"
#include "mjpeg.h"
......
......@@ -27,7 +27,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "mathops.h"
#include "mjpeg.h"
......
......@@ -26,7 +26,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "mathops.h"
......
......@@ -30,7 +30,7 @@
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "unary_legacy.h"
#include "ralfdata.h"
......
......@@ -25,9 +25,9 @@
*/
#include "avcodec.h"
#include "golomb_legacy.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "golomb.h"
#include "rv34.h"
#include "rv30data.h"
......
......@@ -28,9 +28,9 @@
#include "avcodec.h"
#include "error_resilience.h"
#include "golomb_legacy.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "golomb.h"
#include "internal.h"
#include "mathops.h"
#include "mpeg_er.h"
......
......@@ -27,9 +27,9 @@
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "golomb_legacy.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "golomb.h"
#include "rv34.h"
#include "rv40vlc2.h"
......
......@@ -29,7 +29,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
#include "golomb.h"
#include "golomb_legacy.h"
#include "internal.h"
#define MAX_CHANNELS 8
......
......@@ -43,12 +43,13 @@
#include <inttypes.h>
#include "libavutil/attributes.h"
#include "golomb_legacy.h"
#include "internal.h"
#include "avcodec.h"
#include "mpegutils.h"
#include "h264dec.h"
#include "h264data.h"
#include "golomb.h"
#include "hpeldsp.h"
#include "mathops.h"
#include "rectangle.h"
......
......@@ -21,7 +21,7 @@
#include "libavutil/mem.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/bitstream.h"
#include "libavcodec/put_bits.h"
#include "libavcodec/golomb.h"
......@@ -33,7 +33,7 @@ int main(void)
int i, ret = 0;
uint8_t *temp;
PutBitContext pb;
GetBitContext gb;
BitstreamContext bc;
temp = av_malloc(SIZE);
if (!temp)
......@@ -44,11 +44,11 @@ int main(void)
set_ue_golomb(&pb, i);
flush_put_bits(&pb);
init_get_bits(&gb, temp, 8 * SIZE);
bitstream_init8(&bc, temp, SIZE);
for (i = 0; i < COUNT; i++) {
int j, s = show_bits(&gb, 25);
int j, s = bitstream_peek(&bc, 25);
j = get_ue_golomb(&gb);
j = get_ue_golomb(&bc);
if (j != i) {
fprintf(stderr, "get_ue_golomb: expected %d, got %d. bits: %7x\n",
i, j, s);
......@@ -62,11 +62,11 @@ int main(void)
set_ue_golomb(&pb, EXTEND(i));
flush_put_bits(&pb);
init_get_bits(&gb, temp, 8 * SIZE);
bitstream_init8(&bc, temp, SIZE);
for (i = 0; i < COUNT; i++) {
int j, s = show_bits_long(&gb, 32);
int j, s = bitstream_peek(&bc, 32);
j = get_ue_golomb_long(&gb);
j = get_ue_golomb_long(&bc);
if (j != EXTEND(i)) {
fprintf(stderr, "get_ue_golomb_long: expected %d, got %d. "
"bits: %8x\n", EXTEND(i), j, s);
......@@ -79,11 +79,11 @@ int main(void)
set_se_golomb(&pb, i - COUNT / 2);
flush_put_bits(&pb);
init_get_bits(&gb, temp, 8 * SIZE);
bitstream_init8(&bc, temp, SIZE);
for (i = 0; i < COUNT; i++) {
int j, s = show_bits(&gb, 25);
int j, s = bitstream_peek(&bc, 25);
j = get_se_golomb(&gb);
j = get_se_golomb(&bc);
if (j != i - COUNT / 2) {
fprintf(stderr, "get_se_golomb: expected %d, got %d. bits: %7x\n",
i - COUNT / 2, j, s);
......
......@@ -20,7 +20,7 @@
#include "libavcodec/avcodec.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/golomb.h"
#include "libavcodec/golomb_legacy.h"
#include "libavcodec/hevc.h"
#include "libavutil/intreadwrite.h"
#include "avc.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment