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
6e719dc6
Commit
6e719dc6
authored
Oct 14, 2015
by
Hendrik Leppkes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp9: expose reference frames in VP9SharedContext
parent
b95f241b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
115 deletions
+120
-115
vp9.c
libavcodec/vp9.c
+96
-113
vp9.h
libavcodec/vp9.h
+22
-0
vp9_mc_template.c
libavcodec/vp9_mc_template.c
+2
-2
No files found.
libavcodec/vp9.c
View file @
6e719dc6
This diff is collapsed.
Click to expand it.
libavcodec/vp9.h
View file @
6e719dc6
...
...
@@ -26,6 +26,9 @@
#include <stdint.h>
#include "thread.h"
#include "vp56.h"
enum
BlockLevel
{
BL_64X64
,
BL_32X32
,
...
...
@@ -115,6 +118,19 @@ enum CompPredMode {
PRED_SWITCHABLE
,
};
struct
VP9mvrefPair
{
VP56mv
mv
[
2
];
int8_t
ref
[
2
];
};
typedef
struct
VP9Frame
{
ThreadFrame
tf
;
AVBufferRef
*
extradata
;
uint8_t
*
segmentation_map
;
struct
VP9mvrefPair
*
mv
;
int
uses_2pass
;
}
VP9Frame
;
typedef
struct
VP9BitstreamHeader
{
// bitstream header
uint8_t
profile
;
...
...
@@ -181,6 +197,12 @@ typedef struct VP9BitstreamHeader {
typedef
struct
VP9SharedContext
{
VP9BitstreamHeader
h
;
ThreadFrame
refs
[
8
];
#define CUR_FRAME 0
#define REF_FRAME_MVPAIR 1
#define REF_FRAME_SEGMAP 2
VP9Frame
frames
[
3
];
}
VP9SharedContext
;
#endif
/* AVCODEC_VP9_H */
libavcodec/vp9_mc_template.c
View file @
6e719dc6
...
...
@@ -36,14 +36,14 @@ static void FN(inter_pred)(AVCodecContext *ctx)
VP9Context
*
s
=
ctx
->
priv_data
;
VP9Block
*
b
=
s
->
b
;
int
row
=
s
->
row
,
col
=
s
->
col
;
ThreadFrame
*
tref1
=
&
s
->
refs
[
s
->
s
.
h
.
refidx
[
b
->
ref
[
0
]]],
*
tref2
;
ThreadFrame
*
tref1
=
&
s
->
s
.
refs
[
s
->
s
.
h
.
refidx
[
b
->
ref
[
0
]]],
*
tref2
;
AVFrame
*
ref1
=
tref1
->
f
,
*
ref2
;
int
w1
=
ref1
->
width
,
h1
=
ref1
->
height
,
w2
,
h2
;
ptrdiff_t
ls_y
=
s
->
y_stride
,
ls_uv
=
s
->
uv_stride
;
int
bytesperpixel
=
BYTES_PER_PIXEL
;
if
(
b
->
comp
)
{
tref2
=
&
s
->
refs
[
s
->
s
.
h
.
refidx
[
b
->
ref
[
1
]]];
tref2
=
&
s
->
s
.
refs
[
s
->
s
.
h
.
refidx
[
b
->
ref
[
1
]]];
ref2
=
tref2
->
f
;
w2
=
ref2
->
width
;
h2
=
ref2
->
height
;
...
...
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