Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
fa64aea1
Commit
fa64aea1
authored
Jun 08, 2016
by
Alexandra Hájková
Committed by
Diego Biurrun
Dec 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unary: Convert to the new bitstream reader
parent
45286a62
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
83 additions
and
24 deletions
+83
-24
aic.c
libavcodec/aic.c
+1
-1
alac.c
libavcodec/alac.c
+1
-1
alsdec.c
libavcodec/alsdec.c
+2
-1
apedec.c
libavcodec/apedec.c
+1
-1
dca_xll.c
libavcodec/dca_xll.c
+1
-1
dxtory.c
libavcodec/dxtory.c
+1
-1
ituh263dec.c
libavcodec/ituh263dec.c
+1
-1
mss4.c
libavcodec/mss4.c
+1
-1
ralf.c
libavcodec/ralf.c
+1
-1
takdec.c
libavcodec/takdec.c
+1
-1
tta.c
libavcodec/tta.c
+1
-1
unary.h
libavcodec/unary.h
+10
-9
unary_legacy.h
libavcodec/unary_legacy.h
+56
-0
vc1.c
libavcodec/vc1.c
+1
-1
vc1_block.c
libavcodec/vc1_block.c
+1
-1
wavpack.c
libavcodec/wavpack.c
+1
-1
mpc8.c
libavformat/mpc8.c
+2
-1
No files found.
libavcodec/aic.c
View file @
fa64aea1
...
...
@@ -29,7 +29,7 @@
#include "golomb.h"
#include "idctdsp.h"
#include "thread.h"
#include "unary.h"
#include "unary
_legacy
.h"
#define AIC_HDR_SIZE 24
#define AIC_BAND_COEFFS (64 + 32 + 192 + 96)
...
...
libavcodec/alac.c
View file @
fa64aea1
...
...
@@ -52,8 +52,8 @@
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "unary.h"
#include "mathops.h"
#include "unary_legacy.h"
#include "alac_data.h"
#define ALAC_EXTRADATA_SIZE 36
...
...
libavcodec/alsdec.c
View file @
fa64aea1
...
...
@@ -29,12 +29,13 @@
#include "avcodec.h"
#include "get_bits.h"
#include "unary.h"
#include "mpeg4audio.h"
#include "bytestream.h"
#include "bgmc.h"
#include "bswapdsp.h"
#include "internal.h"
#include "unary_legacy.h"
#include "libavutil/samplefmt.h"
#include "libavutil/crc.h"
...
...
libavcodec/apedec.c
View file @
fa64aea1
...
...
@@ -31,7 +31,7 @@
#include "bytestream.h"
#include "internal.h"
#include "get_bits.h"
#include "unary.h"
#include "unary
_legacy
.h"
/**
* @file
...
...
libavcodec/dca_xll.c
View file @
fa64aea1
...
...
@@ -29,7 +29,7 @@
#include "dca.h"
#include "dcadata.h"
#include "get_bits.h"
#include "unary.h"
#include "unary
_legacy
.h"
/* Sign as bit 0 */
static
inline
int
get_bits_sm
(
GetBitContext
*
s
,
unsigned
n
)
...
...
libavcodec/dxtory.c
View file @
fa64aea1
...
...
@@ -30,7 +30,7 @@
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
#include "unary.h"
#include "unary
_legacy
.h"
static
int
dxtory_decode_v1_rgb
(
AVCodecContext
*
avctx
,
AVFrame
*
pic
,
const
uint8_t
*
src
,
int
src_size
,
...
...
libavcodec/ituh263dec.c
View file @
fa64aea1
...
...
@@ -40,7 +40,7 @@
#include "internal.h"
#include "mathops.h"
#include "mpegutils.h"
#include "unary.h"
#include "unary
_legacy
.h"
#include "flv.h"
#include "rv10.h"
#include "mpeg4video.h"
...
...
libavcodec/mss4.c
View file @
fa64aea1
...
...
@@ -30,7 +30,7 @@
#include "get_bits.h"
#include "internal.h"
#include "mss34dsp.h"
#include "unary.h"
#include "unary
_legacy
.h"
#define HEADER_SIZE 8
...
...
libavcodec/ralf.c
View file @
fa64aea1
...
...
@@ -32,7 +32,7 @@
#include "get_bits.h"
#include "golomb.h"
#include "internal.h"
#include "unary.h"
#include "unary
_legacy
.h"
#include "ralfdata.h"
#define FILTER_NONE 0
...
...
libavcodec/takdec.c
View file @
fa64aea1
...
...
@@ -32,7 +32,7 @@
#include "audiodsp.h"
#include "avcodec.h"
#include "internal.h"
#include "unary.h"
#include "unary
_legacy
.h"
#include "tak.h"
#define MAX_SUBFRAMES 8 // max number of subframes per channel
...
...
libavcodec/tta.c
View file @
fa64aea1
...
...
@@ -35,7 +35,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "unary.h"
#include "unary
_legacy
.h"
#define FORMAT_SIMPLE 1
#define FORMAT_ENCRYPTED 2
...
...
libavcodec/unary.h
View file @
fa64aea1
...
...
@@ -21,36 +21,37 @@
#ifndef AVCODEC_UNARY_H
#define AVCODEC_UNARY_H
#include "
get_bits
.h"
#include "
bitstream
.h"
/**
* Get unary code of limited length
* @param
gb GetBit
Context
* @param
bc Bitstream
Context
* @param[in] stop The bitstop value (unary code of 1's or 0's)
* @param[in] len Maximum length
* @return Unary length/index
*/
static
inline
int
get_unary
(
GetBitContext
*
gb
,
int
stop
,
int
len
)
static
inline
int
get_unary
(
BitstreamContext
*
bc
,
int
stop
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
&&
get_bits1
(
gb
)
!=
stop
;
i
++
);
for
(
i
=
0
;
i
<
len
&&
bitstream_read_bit
(
bc
)
!=
stop
;
i
++
)
;
return
i
;
}
/**
* Get unary code terminated by a 0 with a maximum length of 33
* @param
gb GetBit
Context
* @param
bc Bitstream
Context
* @return Unary length/index
*/
static
inline
int
get_unary_0_33
(
GetBitContext
*
gb
)
static
inline
int
get_unary_0_33
(
BitstreamContext
*
bc
)
{
return
get_unary
(
gb
,
0
,
33
);
return
get_unary
(
bc
,
0
,
33
);
}
static
inline
int
get_unary_0_9
(
GetBitContext
*
gb
)
static
inline
int
get_unary_0_9
(
BitstreamContext
*
bc
)
{
return
get_unary
(
gb
,
0
,
9
);
return
get_unary
(
bc
,
0
,
9
);
}
#endif
/* AVCODEC_UNARY_H */
libavcodec/unary_legacy.h
0 → 100644
View file @
fa64aea1
/*
* copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
*
* 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
*/
#ifndef AVCODEC_UNARY_H
#define AVCODEC_UNARY_H
#include "get_bits.h"
/**
* Get unary code of limited length
* @param gb GetBitContext
* @param[in] stop The bitstop value (unary code of 1's or 0's)
* @param[in] len Maximum length
* @return Unary length/index
*/
static
inline
int
get_unary
(
GetBitContext
*
gb
,
int
stop
,
int
len
)
{
int
i
;
for
(
i
=
0
;
i
<
len
&&
get_bits1
(
gb
)
!=
stop
;
i
++
);
return
i
;
}
/**
* Get unary code terminated by a 0 with a maximum length of 33
* @param gb GetBitContext
* @return Unary length/index
*/
static
inline
int
get_unary_0_33
(
GetBitContext
*
gb
)
{
return
get_unary
(
gb
,
0
,
33
);
}
static
inline
int
get_unary_0_9
(
GetBitContext
*
gb
)
{
return
get_unary
(
gb
,
0
,
9
);
}
#endif
/* AVCODEC_UNARY_H */
libavcodec/vc1.c
View file @
fa64aea1
...
...
@@ -30,10 +30,10 @@
#include "internal.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "unary_legacy.h"
#include "vc1.h"
#include "vc1data.h"
#include "wmv2data.h"
#include "unary.h"
#include "simple_idct.h"
/***********************************************************************/
...
...
libavcodec/vc1_block.c
View file @
fa64aea1
...
...
@@ -30,7 +30,7 @@
#include "mpegutils.h"
#include "mpegvideo.h"
#include "msmpeg4data.h"
#include "unary.h"
#include "unary
_legacy
.h"
#include "vc1.h"
#include "vc1_pred.h"
#include "vc1acdata.h"
...
...
libavcodec/wavpack.c
View file @
fa64aea1
...
...
@@ -26,7 +26,7 @@
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
#include "unary.h"
#include "unary
_legacy
.h"
/**
* @file
...
...
libavformat/mpc8.c
View file @
fa64aea1
...
...
@@ -20,7 +20,8 @@
*/
#include "libavcodec/get_bits.h"
#include "libavcodec/unary.h"
#include "libavcodec/unary_legacy.h"
#include "apetag.h"
#include "avformat.h"
#include "internal.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment