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
8df1ac6b
Commit
8df1ac6b
authored
Apr 09, 2016
by
Alexandra Hájková
Committed by
Anton Khirnov
Nov 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exr: Convert to the new bitstream reader
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
2906d8dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
exr.c
libavcodec/exr.c
+6
-6
No files found.
libavcodec/exr.c
View file @
8df1ac6b
...
...
@@ -39,8 +39,8 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "bitstream.h"
#include "bytestream.h"
#include "get_bits.h"
#include "internal.h"
#include "mathops.h"
#include "thread.h"
...
...
@@ -379,16 +379,16 @@ static void huf_canonical_code_table(uint64_t *hcode)
static
int
huf_unpack_enc_table
(
GetByteContext
*
gb
,
int32_t
im
,
int32_t
iM
,
uint64_t
*
hcode
)
{
GetBitContext
gbit
;
int
ret
=
init_get_bits8
(
&
gbit
,
gb
->
buffer
,
bytestream2_get_bytes_left
(
gb
));
BitstreamContext
bc
;
int
ret
=
bitstream_init8
(
&
bc
,
gb
->
buffer
,
bytestream2_get_bytes_left
(
gb
));
if
(
ret
<
0
)
return
ret
;
for
(;
im
<=
iM
;
im
++
)
{
uint64_t
l
=
hcode
[
im
]
=
get_bits
(
&
gbit
,
6
);
uint64_t
l
=
hcode
[
im
]
=
bitstream_read
(
&
bc
,
6
);
if
(
l
==
LONG_ZEROCODE_RUN
)
{
int
zerun
=
get_bits
(
&
gbit
,
8
)
+
SHORTEST_LONG_RUN
;
int
zerun
=
bitstream_read
(
&
bc
,
8
)
+
SHORTEST_LONG_RUN
;
if
(
im
+
zerun
>
iM
+
1
)
return
AVERROR_INVALIDDATA
;
...
...
@@ -410,7 +410,7 @@ static int huf_unpack_enc_table(GetByteContext *gb,
}
}
bytestream2_skip
(
gb
,
(
get_bits_count
(
&
gbit
)
+
7
)
/
8
);
bytestream2_skip
(
gb
,
(
bitstream_tell
(
&
bc
)
+
7
)
/
8
);
huf_canonical_code_table
(
hcode
);
return
0
;
...
...
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