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
e12188e1
Commit
e12188e1
authored
May 14, 2015
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp9: fix segmentation map referencing upon framesize change.
parent
d32d0593
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
vp9.c
libavcodec/vp9.c
+6
-3
No files found.
libavcodec/vp9.c
View file @
e12188e1
...
@@ -153,6 +153,7 @@ typedef struct VP9Context {
...
@@ -153,6 +153,7 @@ typedef struct VP9Context {
uint8_t
temporal
;
uint8_t
temporal
;
uint8_t
absolute_vals
;
uint8_t
absolute_vals
;
uint8_t
update_map
;
uint8_t
update_map
;
uint8_t
ignore_refmap
;
struct
{
struct
{
uint8_t
q_enabled
;
uint8_t
q_enabled
;
uint8_t
lf_enabled
;
uint8_t
lf_enabled
;
...
@@ -724,6 +725,7 @@ static int decode_frame_header(AVCodecContext *ctx,
...
@@ -724,6 +725,7 @@ static int decode_frame_header(AVCodecContext *ctx,
s
->
uvdc_qdelta
==
0
&&
s
->
uvac_qdelta
==
0
;
s
->
uvdc_qdelta
==
0
&&
s
->
uvac_qdelta
==
0
;
/* segmentation header info */
/* segmentation header info */
s
->
segmentation
.
ignore_refmap
=
0
;
if
((
s
->
segmentation
.
enabled
=
get_bits1
(
&
s
->
gb
)))
{
if
((
s
->
segmentation
.
enabled
=
get_bits1
(
&
s
->
gb
)))
{
if
((
s
->
segmentation
.
update_map
=
get_bits1
(
&
s
->
gb
)))
{
if
((
s
->
segmentation
.
update_map
=
get_bits1
(
&
s
->
gb
)))
{
for
(
i
=
0
;
i
<
7
;
i
++
)
for
(
i
=
0
;
i
<
7
;
i
++
)
...
@@ -738,10 +740,11 @@ static int decode_frame_header(AVCodecContext *ctx,
...
@@ -738,10 +740,11 @@ static int decode_frame_header(AVCodecContext *ctx,
if
((
!
s
->
segmentation
.
update_map
||
s
->
segmentation
.
temporal
)
&&
if
((
!
s
->
segmentation
.
update_map
||
s
->
segmentation
.
temporal
)
&&
(
w
!=
s
->
frames
[
CUR_FRAME
].
tf
.
f
->
width
||
(
w
!=
s
->
frames
[
CUR_FRAME
].
tf
.
f
->
width
||
h
!=
s
->
frames
[
CUR_FRAME
].
tf
.
f
->
height
))
{
h
!=
s
->
frames
[
CUR_FRAME
].
tf
.
f
->
height
))
{
av_log
(
ctx
,
AV_LOG_
ERROR
,
av_log
(
ctx
,
AV_LOG_
WARNING
,
"Reference segmap (temp=%d,update=%d) enabled on size-change!
\n
"
,
"Reference segmap (temp=%d,update=%d) enabled on size-change!
\n
"
,
s
->
segmentation
.
temporal
,
s
->
segmentation
.
update_map
);
s
->
segmentation
.
temporal
,
s
->
segmentation
.
update_map
);
return
AVERROR_INVALIDDATA
;
s
->
segmentation
.
ignore_refmap
=
1
;
//return AVERROR_INVALIDDATA;
}
}
if
(
get_bits1
(
&
s
->
gb
))
{
if
(
get_bits1
(
&
s
->
gb
))
{
...
@@ -1457,7 +1460,7 @@ static void decode_mode(AVCodecContext *ctx)
...
@@ -1457,7 +1460,7 @@ static void decode_mode(AVCodecContext *ctx)
vp56_rac_get_prob_branchy
(
&
s
->
c
,
vp56_rac_get_prob_branchy
(
&
s
->
c
,
s
->
prob
.
segpred
[
s
->
above_segpred_ctx
[
col
]
+
s
->
prob
.
segpred
[
s
->
above_segpred_ctx
[
col
]
+
s
->
left_segpred_ctx
[
row7
]])))
{
s
->
left_segpred_ctx
[
row7
]])))
{
if
(
!
s
->
errorres
)
{
if
(
!
s
->
errorres
&&
!
s
->
segmentation
.
ignore_refmap
)
{
int
pred
=
8
,
x
;
int
pred
=
8
,
x
;
uint8_t
*
refsegmap
=
s
->
frames
[
REF_FRAME_SEGMAP
].
segmentation_map
;
uint8_t
*
refsegmap
=
s
->
frames
[
REF_FRAME_SEGMAP
].
segmentation_map
;
...
...
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