Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b4c0daa8
Commit
b4c0daa8
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
cdxl: Convert to the new bitstream reader
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
0977a7c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
cdxl.c
libavcodec/cdxl.c
+10
-9
No files found.
libavcodec/cdxl.c
View file @
b4c0daa8
...
@@ -21,8 +21,9 @@
...
@@ -21,8 +21,9 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "avcodec.h"
#include "
get_bits
.h"
#include "
bitstream
.h"
#include "internal.h"
#include "internal.h"
#define BIT_PLANAR 0x00
#define BIT_PLANAR 0x00
...
@@ -69,30 +70,30 @@ static void import_palette(CDXLVideoContext *c, uint32_t *new_palette)
...
@@ -69,30 +70,30 @@ static void import_palette(CDXLVideoContext *c, uint32_t *new_palette)
static
void
bitplanar2chunky
(
CDXLVideoContext
*
c
,
int
linesize
,
uint8_t
*
out
)
static
void
bitplanar2chunky
(
CDXLVideoContext
*
c
,
int
linesize
,
uint8_t
*
out
)
{
{
GetBitContext
gb
;
BitstreamContext
bc
;
int
x
,
y
,
plane
;
int
x
,
y
,
plane
;
init_get_bits
(
&
gb
,
c
->
video
,
c
->
video_size
*
8
);
bitstream_init
(
&
bc
,
c
->
video
,
c
->
video_size
*
8
);
for
(
plane
=
0
;
plane
<
c
->
bpp
;
plane
++
)
{
for
(
plane
=
0
;
plane
<
c
->
bpp
;
plane
++
)
{
for
(
y
=
0
;
y
<
c
->
avctx
->
height
;
y
++
)
{
for
(
y
=
0
;
y
<
c
->
avctx
->
height
;
y
++
)
{
for
(
x
=
0
;
x
<
c
->
avctx
->
width
;
x
++
)
for
(
x
=
0
;
x
<
c
->
avctx
->
width
;
x
++
)
out
[
linesize
*
y
+
x
]
|=
get_bits1
(
&
gb
)
<<
plane
;
out
[
linesize
*
y
+
x
]
|=
bitstream_read_bit
(
&
bc
)
<<
plane
;
skip_bits
(
&
gb
,
c
->
padded_bits
);
bitstream_skip
(
&
bc
,
c
->
padded_bits
);
}
}
}
}
}
}
static
void
bitline2chunky
(
CDXLVideoContext
*
c
,
int
linesize
,
uint8_t
*
out
)
static
void
bitline2chunky
(
CDXLVideoContext
*
c
,
int
linesize
,
uint8_t
*
out
)
{
{
GetBitContext
gb
;
BitstreamContext
bc
;
int
x
,
y
,
plane
;
int
x
,
y
,
plane
;
init_get_bits
(
&
gb
,
c
->
video
,
c
->
video_size
*
8
);
bitstream_init
(
&
bc
,
c
->
video
,
c
->
video_size
*
8
);
for
(
y
=
0
;
y
<
c
->
avctx
->
height
;
y
++
)
{
for
(
y
=
0
;
y
<
c
->
avctx
->
height
;
y
++
)
{
for
(
plane
=
0
;
plane
<
c
->
bpp
;
plane
++
)
{
for
(
plane
=
0
;
plane
<
c
->
bpp
;
plane
++
)
{
for
(
x
=
0
;
x
<
c
->
avctx
->
width
;
x
++
)
for
(
x
=
0
;
x
<
c
->
avctx
->
width
;
x
++
)
out
[
linesize
*
y
+
x
]
|=
get_bits1
(
&
gb
)
<<
plane
;
out
[
linesize
*
y
+
x
]
|=
bitstream_read_bit
(
&
bc
)
<<
plane
;
skip_bits
(
&
gb
,
c
->
padded_bits
);
bitstream_skip
(
&
bc
,
c
->
padded_bits
);
}
}
}
}
}
}
...
...
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