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
1eaae7ab
Commit
1eaae7ab
authored
Feb 20, 2016
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intrax8: Reference the current AVCodecContext
It will be needed to initialize BlockDSP in the next commit.
parent
8072345e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
intrax8.c
libavcodec/intrax8.c
+3
-1
intrax8.h
libavcodec/intrax8.h
+4
-1
vc1dec.c
libavcodec/vc1dec.c
+1
-1
wmv2dec.c
libavcodec/wmv2dec.c
+1
-1
No files found.
libavcodec/intrax8.c
View file @
1eaae7ab
...
...
@@ -737,13 +737,15 @@ static void x8_init_block_index(IntraX8Context *w, AVFrame *frame, int mb_y)
w
->
dest
[
2
]
+=
(
mb_y
&
(
~
1
))
*
uvlinesize
<<
2
;
}
av_cold
int
ff_intrax8_common_init
(
IntraX8Context
*
w
,
IDCTDSPContext
*
idsp
,
av_cold
int
ff_intrax8_common_init
(
AVCodecContext
*
avctx
,
IntraX8Context
*
w
,
IDCTDSPContext
*
idsp
,
MpegEncContext
*
const
s
)
{
int
ret
=
x8_vlc_init
();
if
(
ret
<
0
)
return
ret
;
w
->
avctx
=
avctx
;
w
->
idsp
=
*
idsp
;
w
->
s
=
s
;
...
...
libavcodec/intrax8.h
View file @
1eaae7ab
...
...
@@ -35,6 +35,7 @@ typedef struct IntraX8Context {
// set by ff_intrax8_common_init
uint8_t
*
prediction_table
;
// 2 * (mb_w * 2)
ScanTable
scantable
[
3
];
AVCodecContext
*
avctx
;
// set by the caller codec
MpegEncContext
*
s
;
...
...
@@ -67,12 +68,14 @@ typedef struct IntraX8Context {
/**
* Initialize IntraX8 frame decoder.
* Requires valid MpegEncContext with valid s->mb_width before calling.
* @param avctx pointer to AVCodecContext
* @param w pointer to IntraX8Context
* @param idsp pointer to IDCTDSPContext
* @param s pointer to MpegEncContext of the parent codec
* @return 0 on success, a negative AVERROR value on error
*/
int
ff_intrax8_common_init
(
IntraX8Context
*
w
,
IDCTDSPContext
*
idsp
,
int
ff_intrax8_common_init
(
AVCodecContext
*
avctx
,
IntraX8Context
*
w
,
IDCTDSPContext
*
idsp
,
MpegEncContext
*
const
s
);
/**
...
...
libavcodec/vc1dec.c
View file @
1eaae7ab
...
...
@@ -379,7 +379,7 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
}
}
ret
=
ff_intrax8_common_init
(
&
v
->
x8
,
&
s
->
idsp
,
s
);
ret
=
ff_intrax8_common_init
(
s
->
avctx
,
&
v
->
x8
,
&
s
->
idsp
,
s
);
if
(
ret
<
0
)
goto
error
;
...
...
libavcodec/wmv2dec.c
View file @
1eaae7ab
...
...
@@ -473,7 +473,7 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
ff_wmv2_common_init
(
w
);
return
ff_intrax8_common_init
(
&
w
->
x8
,
&
w
->
s
.
idsp
,
&
w
->
s
);
return
ff_intrax8_common_init
(
avctx
,
&
w
->
x8
,
&
w
->
s
.
idsp
,
&
w
->
s
);
}
static
av_cold
int
wmv2_decode_end
(
AVCodecContext
*
avctx
)
...
...
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