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
3e01c9b5
Commit
3e01c9b5
authored
Oct 14, 2011
by
JULIAN GARDNER
Committed by
Michael Niedermayer
Oct 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvbsubdec: cosmetic change on how xpos is passed around
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bca8bd99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
dvbsubdec.c
libavcodec/dvbsubdec.c
+21
-15
No files found.
libavcodec/dvbsubdec.c
View file @
3e01c9b5
...
...
@@ -469,16 +469,18 @@ static av_cold int dvbsub_close_decoder(AVCodecContext *avctx)
static
int
dvbsub_read_2bit_string
(
uint8_t
*
destbuf
,
int
dbuf_len
,
const
uint8_t
**
srcbuf
,
int
buf_size
,
int
non_mod
,
uint8_t
*
map_table
)
int
non_mod
,
uint8_t
*
map_table
,
int
x_pos
)
{
GetBitContext
gb
;
int
bits
;
int
run_length
;
int
pixels_read
=
0
;
int
pixels_read
=
x_pos
;
init_get_bits
(
&
gb
,
*
srcbuf
,
buf_size
<<
3
);
destbuf
+=
x_pos
;
while
(
get_bits_count
(
&
gb
)
<
buf_size
<<
3
&&
pixels_read
<
dbuf_len
)
{
bits
=
get_bits
(
&
gb
,
2
);
...
...
@@ -574,16 +576,18 @@ static int dvbsub_read_2bit_string(uint8_t *destbuf, int dbuf_len,
static
int
dvbsub_read_4bit_string
(
uint8_t
*
destbuf
,
int
dbuf_len
,
const
uint8_t
**
srcbuf
,
int
buf_size
,
int
non_mod
,
uint8_t
*
map_table
)
int
non_mod
,
uint8_t
*
map_table
,
int
x_pos
)
{
GetBitContext
gb
;
int
bits
;
int
run_length
;
int
pixels_read
=
0
;
int
pixels_read
=
x_pos
;
init_get_bits
(
&
gb
,
*
srcbuf
,
buf_size
<<
3
);
destbuf
+=
x_pos
;
while
(
get_bits_count
(
&
gb
)
<
buf_size
<<
3
&&
pixels_read
<
dbuf_len
)
{
bits
=
get_bits
(
&
gb
,
4
);
...
...
@@ -695,12 +699,14 @@ static int dvbsub_read_4bit_string(uint8_t *destbuf, int dbuf_len,
static
int
dvbsub_read_8bit_string
(
uint8_t
*
destbuf
,
int
dbuf_len
,
const
uint8_t
**
srcbuf
,
int
buf_size
,
int
non_mod
,
uint8_t
*
map_table
)
int
non_mod
,
uint8_t
*
map_table
,
int
x_pos
)
{
const
uint8_t
*
sbuf_end
=
(
*
srcbuf
)
+
buf_size
;
int
bits
;
int
run_length
;
int
pixels_read
=
0
;
int
pixels_read
=
x_pos
;
destbuf
+=
x_pos
;
while
(
*
srcbuf
<
sbuf_end
&&
pixels_read
<
dbuf_len
)
{
bits
=
*
(
*
srcbuf
)
++
;
...
...
@@ -812,9 +818,9 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
else
map_table
=
NULL
;
x_pos
+=
dvbsub_read_2bit_string
(
pbuf
+
(
y_pos
*
region
->
width
)
+
x_pos
,
region
->
width
-
x_pos
,
&
buf
,
buf_end
-
buf
,
non_mod
,
map_table
);
x_pos
=
dvbsub_read_2bit_string
(
pbuf
+
(
y_pos
*
region
->
width
)
,
region
->
width
,
&
buf
,
buf_end
-
buf
,
non_mod
,
map_table
,
x_pos
);
break
;
case
0x11
:
if
(
region
->
depth
<
4
)
{
...
...
@@ -827,9 +833,9 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
else
map_table
=
NULL
;
x_pos
+=
dvbsub_read_4bit_string
(
pbuf
+
(
y_pos
*
region
->
width
)
+
x_pos
,
region
->
width
-
x_pos
,
&
buf
,
buf_end
-
buf
,
non_mod
,
map_table
);
x_pos
=
dvbsub_read_4bit_string
(
pbuf
+
(
y_pos
*
region
->
width
)
,
region
->
width
,
&
buf
,
buf_end
-
buf
,
non_mod
,
map_table
,
x_pos
);
break
;
case
0x12
:
if
(
region
->
depth
<
8
)
{
...
...
@@ -837,9 +843,9 @@ static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
return
;
}
x_pos
+=
dvbsub_read_8bit_string
(
pbuf
+
(
y_pos
*
region
->
width
)
+
x_pos
,
region
->
width
-
x_pos
,
&
buf
,
buf_end
-
buf
,
non_mod
,
NULL
);
x_pos
=
dvbsub_read_8bit_string
(
pbuf
+
(
y_pos
*
region
->
width
)
,
region
->
width
,
&
buf
,
buf_end
-
buf
,
non_mod
,
NULL
,
x_pos
);
break
;
case
0x20
:
...
...
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