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
a43bcaaf
Commit
a43bcaaf
authored
Sep 25, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dxtory: Support dxtory-2.0.127.avi
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c0f9df30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
dxtory.c
libavcodec/dxtory.c
+4
-6
No files found.
libavcodec/dxtory.c
View file @
a43bcaaf
...
...
@@ -424,7 +424,7 @@ static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
return
AVERROR_INVALIDDATA
;
}
if
(
!
nslices
||
avctx
->
height
%
nslices
)
{
if
(
!
nslices
)
{
avpriv_request_sample
(
avctx
,
"%d slices for %dx%d"
,
nslices
,
avctx
->
width
,
avctx
->
height
);
return
AVERROR_PATCHWELCOME
;
...
...
@@ -445,9 +445,9 @@ static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
V
=
pic
->
data
[
2
];
cur_y
=
0
;
next_y
=
ref_slice_height
;
for
(
slice
=
0
;
slice
<
nslices
;
slice
++
)
{
slice_size
=
bytestream2_get_le32
(
&
gb
);
next_y
=
((
slice
+
1
)
*
avctx
->
height
)
/
nslices
;
slice_height
=
(
next_y
&
~
3
)
-
(
cur_y
&
~
3
);
if
(
slice_size
>
src_size
-
off
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
...
...
@@ -475,7 +475,6 @@ static int dxtory_decode_v2_410(AVCodecContext *avctx, AVFrame *pic,
V
+=
pic
->
linesize
[
2
]
*
(
slice_height
>>
2
);
off
+=
slice_size
;
cur_y
=
next_y
;
next_y
+=
ref_slice_height
;
}
return
0
;
...
...
@@ -528,7 +527,7 @@ static int dxtory_decode_v2_420(AVCodecContext *avctx, AVFrame *pic,
return
AVERROR_INVALIDDATA
;
}
if
(
!
nslices
||
avctx
->
height
%
nslices
)
{
if
(
!
nslices
)
{
avpriv_request_sample
(
avctx
,
"%d slices for %dx%d"
,
nslices
,
avctx
->
width
,
avctx
->
height
);
return
AVERROR_PATCHWELCOME
;
...
...
@@ -549,9 +548,9 @@ static int dxtory_decode_v2_420(AVCodecContext *avctx, AVFrame *pic,
V
=
pic
->
data
[
2
];
cur_y
=
0
;
next_y
=
ref_slice_height
;
for
(
slice
=
0
;
slice
<
nslices
;
slice
++
)
{
slice_size
=
bytestream2_get_le32
(
&
gb
);
next_y
=
((
slice
+
1
)
*
avctx
->
height
)
/
nslices
;
slice_height
=
(
next_y
&
~
1
)
-
(
cur_y
&
~
1
);
if
(
slice_size
>
src_size
-
off
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
...
...
@@ -579,7 +578,6 @@ static int dxtory_decode_v2_420(AVCodecContext *avctx, AVFrame *pic,
V
+=
pic
->
linesize
[
2
]
*
(
slice_height
>>
1
);
off
+=
slice_size
;
cur_y
=
next_y
;
next_y
+=
ref_slice_height
;
}
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