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
e121ac63
Commit
e121ac63
authored
Jun 20, 2014
by
Dirk Ausserhaus
Committed by
Kostya Shishkov
Jun 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indeo45: use is_indeo4 context flag instead of checking codec ID
Signed-off-by:
Kostya Shishkov
<
kostya.shishkov@gmail.com
>
parent
c67b449b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
indeo4.c
libavcodec/indeo4.c
+2
-0
indeo5.c
libavcodec/indeo5.c
+2
-0
ivi_common.c
libavcodec/ivi_common.c
+4
-6
ivi_common.h
libavcodec/ivi_common.h
+2
-0
No files found.
libavcodec/indeo4.c
View file @
e121ac63
...
...
@@ -620,6 +620,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
ctx
->
switch_buffers
=
switch_buffers
;
ctx
->
is_nonnull_frame
=
is_nonnull_frame
;
ctx
->
is_indeo4
=
1
;
ctx
->
p_frame
=
av_frame_alloc
();
if
(
!
ctx
->
p_frame
)
return
AVERROR
(
ENOMEM
);
...
...
libavcodec/indeo5.c
View file @
e121ac63
...
...
@@ -640,6 +640,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
ctx
->
switch_buffers
=
switch_buffers
;
ctx
->
is_nonnull_frame
=
is_nonnull_frame
;
ctx
->
is_indeo4
=
0
;
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV410P
;
return
0
;
...
...
libavcodec/ivi_common.c
View file @
e121ac63
...
...
@@ -968,8 +968,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if
(
ctx
->
gop_invalid
)
return
AVERROR_INVALIDDATA
;
if
(
avctx
->
codec_id
==
AV_CODEC_ID_INDEO4
&&
ctx
->
frame_type
==
IVI4_FRAMETYPE_NULL_LAST
)
{
if
(
ctx
->
is_indeo4
&&
ctx
->
frame_type
==
IVI4_FRAMETYPE_NULL_LAST
)
{
if
(
ctx
->
got_p_frame
)
{
av_frame_move_ref
(
data
,
ctx
->
p_frame
);
*
got_frame
=
1
;
...
...
@@ -1027,7 +1026,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
}
if
(
ctx
->
is_scalable
)
{
if
(
avctx
->
codec_id
==
AV_CODEC_ID_INDEO
4
)
if
(
ctx
->
is_indeo
4
)
ff_ivi_recompose_haar
(
&
ctx
->
planes
[
0
],
frame
->
data
[
0
],
frame
->
linesize
[
0
]);
else
ff_ivi_recompose53
(
&
ctx
->
planes
[
0
],
frame
->
data
[
0
],
frame
->
linesize
[
0
]);
...
...
@@ -1045,8 +1044,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
* to be the only way to handle the B-frames mode.
* That's exactly the same Intel decoders do.
*/
if
(
avctx
->
codec_id
==
AV_CODEC_ID_INDEO4
&&
ctx
->
frame_type
==
IVI4_FRAMETYPE_INTRA
)
{
if
(
ctx
->
is_indeo4
&&
ctx
->
frame_type
==
IVI4_FRAMETYPE_INTRA
)
{
int
left
;
while
(
get_bits
(
&
ctx
->
gb
,
8
));
// skip version string
...
...
@@ -1077,7 +1075,7 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
ff_free_vlc
(
&
ctx
->
mb_vlc
.
cust_tab
);
#if IVI4_STREAM_ANALYSER
if
(
avctx
->
codec_id
==
AV_CODEC_ID_INDEO
4
)
{
if
(
ctx
->
is_indeo
4
)
{
if
(
ctx
->
is_scalable
)
av_log
(
avctx
,
AV_LOG_ERROR
,
"This video uses scalability mode!
\n
"
);
if
(
ctx
->
uses_tiling
)
...
...
libavcodec/ivi_common.h
View file @
e121ac63
...
...
@@ -261,6 +261,8 @@ typedef struct IVI45DecContext {
int
gop_invalid
;
int
is_indeo4
;
AVFrame
*
p_frame
;
int
got_p_frame
;
}
IVI45DecContext
;
...
...
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