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
5bc69f38
Commit
5bc69f38
authored
Jan 28, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
error_resilience: do not require mbintra/skip tables
h264dec does not use them at all and only allocates them for ER.
parent
c377e04d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
error_resilience.c
libavcodec/error_resilience.c
+4
-3
h264.c
libavcodec/h264.c
+0
-7
No files found.
libavcodec/error_resilience.c
View file @
5bc69f38
...
...
@@ -934,7 +934,7 @@ void ff_er_frame_end(ERContext *s)
const
int
mb_xy
=
s
->
mb_index2xy
[
i
];
int
error
=
s
->
error_status_table
[
mb_xy
];
if
(
!
s
->
mbskip_table
[
mb_xy
])
// FIXME partition specific
if
(
s
->
mbskip_table
&&
!
s
->
mbskip_table
[
mb_xy
])
// FIXME partition specific
distance
++
;
if
(
error
&
(
1
<<
error_type
))
distance
=
0
;
...
...
@@ -1205,11 +1205,12 @@ ec_clean:
const
int
mb_xy
=
s
->
mb_index2xy
[
i
];
int
error
=
s
->
error_status_table
[
mb_xy
];
if
(
s
->
cur_pic
.
f
->
pict_type
!=
AV_PICTURE_TYPE_B
&&
if
(
s
->
mbskip_table
&&
s
->
cur_pic
.
f
->
pict_type
!=
AV_PICTURE_TYPE_B
&&
(
error
&
(
ER_DC_ERROR
|
ER_MV_ERROR
|
ER_AC_ERROR
)))
{
s
->
mbskip_table
[
mb_xy
]
=
0
;
}
s
->
mbintra_table
[
mb_xy
]
=
1
;
if
(
s
->
mbintra_table
)
s
->
mbintra_table
[
mb_xy
]
=
1
;
}
memset
(
&
s
->
cur_pic
,
0
,
sizeof
(
ERPicture
));
...
...
libavcodec/h264.c
View file @
5bc69f38
...
...
@@ -383,8 +383,6 @@ void ff_h264_free_tables(H264Context *h, int free_rbsp)
av_freep
(
&
hx
->
er
.
mb_index2xy
);
av_freep
(
&
hx
->
er
.
error_status_table
);
av_freep
(
&
hx
->
er
.
er_temp_buffer
);
av_freep
(
&
hx
->
er
.
mbintra_table
);
av_freep
(
&
hx
->
er
.
mbskip_table
);
if
(
free_rbsp
)
{
av_freep
(
&
hx
->
rbsp_buffer
);
...
...
@@ -524,11 +522,6 @@ int ff_h264_context_init(H264Context *h)
FF_ALLOCZ_OR_GOTO
(
h
->
avctx
,
er
->
error_status_table
,
mb_array_size
*
sizeof
(
uint8_t
),
fail
);
FF_ALLOC_OR_GOTO
(
h
->
avctx
,
er
->
mbintra_table
,
mb_array_size
,
fail
);
memset
(
er
->
mbintra_table
,
1
,
mb_array_size
);
FF_ALLOCZ_OR_GOTO
(
h
->
avctx
,
er
->
mbskip_table
,
mb_array_size
+
2
,
fail
);
FF_ALLOC_OR_GOTO
(
h
->
avctx
,
er
->
er_temp_buffer
,
h
->
mb_height
*
h
->
mb_stride
,
fail
);
...
...
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