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
088dfd3f
Commit
088dfd3f
authored
Feb 14, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dxtory: use init_get_bits8()
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
4177f501
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
dxtory.c
libavcodec/dxtory.c
+10
-5
No files found.
libavcodec/dxtory.c
View file @
088dfd3f
...
...
@@ -285,7 +285,8 @@ static int dxtory_decode_v2_565(AVCodecContext *avctx, AVFrame *pic,
"Slice sizes mismatch: got %"
PRIu32
" instead of %"
PRIu32
"
\n
"
,
AV_RL32
(
src
+
off
),
slice_size
-
16
);
}
init_get_bits
(
&
gb2
,
src
+
off
+
16
,
(
slice_size
-
16
)
*
8
);
if
((
ret
=
init_get_bits8
(
&
gb2
,
src
+
off
+
16
,
slice_size
-
16
))
<
0
)
return
ret
;
dx2_decode_slice_565
(
&
gb2
,
avctx
->
width
,
slice_height
,
dst
,
pic
->
linesize
[
0
],
is_565
);
...
...
@@ -367,7 +368,8 @@ static int dxtory_decode_v2_rgb(AVCodecContext *avctx, AVFrame *pic,
"Slice sizes mismatch: got %"
PRIu32
" instead of %"
PRIu32
"
\n
"
,
AV_RL32
(
src
+
off
),
slice_size
-
16
);
}
init_get_bits
(
&
gb2
,
src
+
off
+
16
,
(
slice_size
-
16
)
*
8
);
if
((
ret
=
init_get_bits8
(
&
gb2
,
src
+
off
+
16
,
slice_size
-
16
))
<
0
)
return
ret
;
dx2_decode_slice_rgb
(
&
gb2
,
avctx
->
width
,
slice_height
,
dst
,
pic
->
linesize
[
0
]);
...
...
@@ -464,7 +466,8 @@ static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
"Slice sizes mismatch: got %"
PRIu32
" instead of %"
PRIu32
"
\n
"
,
AV_RL32
(
src
+
off
),
slice_size
-
16
);
}
init_get_bits
(
&
gb2
,
src
+
off
+
16
,
(
slice_size
-
16
)
*
8
);
if
((
ret
=
init_get_bits8
(
&
gb2
,
src
+
off
+
16
,
slice_size
-
16
))
<
0
)
return
ret
;
dx2_decode_slice_410
(
&
gb2
,
avctx
->
width
,
slice_height
,
Y
,
U
,
V
,
pic
->
linesize
[
0
],
pic
->
linesize
[
1
],
pic
->
linesize
[
2
]);
...
...
@@ -566,7 +569,8 @@ static int dxtory_decode_v2_420(AVCodecContext *avctx, AVFrame *pic,
"Slice sizes mismatch: got %"
PRIu32
" instead of %"
PRIu32
"
\n
"
,
AV_RL32
(
src
+
off
),
slice_size
-
16
);
}
init_get_bits
(
&
gb2
,
src
+
off
+
16
,
(
slice_size
-
16
)
*
8
);
if
((
ret
=
init_get_bits8
(
&
gb2
,
src
+
off
+
16
,
slice_size
-
16
))
<
0
)
return
ret
;
dx2_decode_slice_420
(
&
gb2
,
avctx
->
width
,
slice_height
,
Y
,
U
,
V
,
pic
->
linesize
[
0
],
pic
->
linesize
[
1
],
pic
->
linesize
[
2
]);
...
...
@@ -658,7 +662,8 @@ static int dxtory_decode_v2_444(AVCodecContext *avctx, AVFrame *pic,
"Slice sizes mismatch: got %"
PRIu32
" instead of %"
PRIu32
"
\n
"
,
AV_RL32
(
src
+
off
),
slice_size
-
16
);
}
init_get_bits
(
&
gb2
,
src
+
off
+
16
,
(
slice_size
-
16
)
*
8
);
if
((
ret
=
init_get_bits8
(
&
gb2
,
src
+
off
+
16
,
slice_size
-
16
))
<
0
)
return
ret
;
dx2_decode_slice_444
(
&
gb2
,
avctx
->
width
,
slice_height
,
Y
,
U
,
V
,
pic
->
linesize
[
0
],
pic
->
linesize
[
1
],
pic
->
linesize
[
2
]);
...
...
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