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
65875a8b
Commit
65875a8b
authored
Oct 05, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp8: initialize color space and range properties
parent
0d8a3656
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
vp8.c
libavcodec/vp8.c
+10
-2
vp8.h
libavcodec/vp8.h
+3
-0
No files found.
libavcodec/vp8.c
View file @
65875a8b
...
@@ -670,9 +670,10 @@ static int vp8_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
...
@@ -670,9 +670,10 @@ static int vp8_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
buf_size
-=
header_size
;
buf_size
-=
header_size
;
if
(
s
->
keyframe
)
{
if
(
s
->
keyframe
)
{
if
(
vp8_rac_get
(
c
))
s
->
colorspace
=
vp8_rac_get
(
c
);
if
(
s
->
colorspace
)
av_log
(
s
->
avctx
,
AV_LOG_WARNING
,
"Unspecified colorspace
\n
"
);
av_log
(
s
->
avctx
,
AV_LOG_WARNING
,
"Unspecified colorspace
\n
"
);
vp8_rac_get
(
c
);
// whether we can skip clamping in dsp functions
s
->
fullrange
=
vp8_rac_get
(
c
);
}
}
if
((
s
->
segmentation
.
enabled
=
vp8_rac_get
(
c
)))
if
((
s
->
segmentation
.
enabled
=
vp8_rac_get
(
c
)))
...
@@ -2490,6 +2491,13 @@ int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
...
@@ -2490,6 +2491,13 @@ int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
curframe
=
s
->
framep
[
VP56_FRAME_CURRENT
]
=
vp8_find_free_buffer
(
s
);
curframe
=
s
->
framep
[
VP56_FRAME_CURRENT
]
=
vp8_find_free_buffer
(
s
);
if
(
!
s
->
colorspace
)
avctx
->
colorspace
=
AVCOL_SPC_BT470BG
;
if
(
s
->
fullrange
)
avctx
->
color_range
=
AVCOL_RANGE_JPEG
;
else
avctx
->
color_range
=
AVCOL_RANGE_MPEG
;
/* Given that arithmetic probabilities are updated every frame, it's quite
/* Given that arithmetic probabilities are updated every frame, it's quite
* likely that the values we have on a random interframe are complete
* likely that the values we have on a random interframe are complete
* junk if we didn't start decode on a keyframe. So just don't display
* junk if we didn't start decode on a keyframe. So just don't display
...
...
libavcodec/vp8.h
View file @
65875a8b
...
@@ -264,6 +264,9 @@ typedef struct VP8Context {
...
@@ -264,6 +264,9 @@ typedef struct VP8Context {
vp8_mc_func
put_pixels_tab
[
3
][
3
][
3
];
vp8_mc_func
put_pixels_tab
[
3
][
3
][
3
];
VP8Frame
frames
[
5
];
VP8Frame
frames
[
5
];
uint8_t
colorspace
;
///< 0 is the only value allowed (meaning bt601)
uint8_t
fullrange
;
///< whether we can skip clamping in dsp functions
int
num_jobs
;
int
num_jobs
;
/**
/**
* This describes the macroblock memory layout.
* This describes the macroblock memory layout.
...
...
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