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
48d0fd2d
Commit
48d0fd2d
authored
Nov 05, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: merge common_init() into ff_h264_decode_init.
There is no point in keeping those separate.
parent
25408b2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
25 deletions
+20
-25
h264.c
libavcodec/h264.c
+20
-25
No files found.
libavcodec/h264.c
View file @
48d0fd2d
...
...
@@ -1363,30 +1363,6 @@ fail:
static
int
decode_nal_units
(
H264Context
*
h
,
const
uint8_t
*
buf
,
int
buf_size
,
int
parse_extradata
);
static
av_cold
void
common_init
(
H264Context
*
h
)
{
h
->
width
=
h
->
avctx
->
width
;
h
->
height
=
h
->
avctx
->
height
;
h
->
bit_depth_luma
=
8
;
h
->
chroma_format_idc
=
1
;
ff_h264dsp_init
(
&
h
->
h264dsp
,
8
,
1
);
ff_h264chroma_init
(
&
h
->
h264chroma
,
h
->
sps
.
bit_depth_chroma
);
ff_h264qpel_init
(
&
h
->
h264qpel
,
8
);
ff_h264_pred_init
(
&
h
->
hpc
,
h
->
avctx
->
codec_id
,
8
,
1
);
h
->
dequant_coeff_pps
=
-
1
;
/* needed so that IDCT permutation is known early */
ff_dsputil_init
(
&
h
->
dsp
,
h
->
avctx
);
ff_videodsp_init
(
&
h
->
vdsp
,
8
);
memset
(
h
->
pps
.
scaling_matrix4
,
16
,
6
*
16
*
sizeof
(
uint8_t
));
memset
(
h
->
pps
.
scaling_matrix8
,
16
,
2
*
64
*
sizeof
(
uint8_t
));
}
int
ff_h264_decode_extradata
(
H264Context
*
h
)
{
AVCodecContext
*
avctx
=
h
->
avctx
;
...
...
@@ -1447,7 +1423,26 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx)
int
i
;
h
->
avctx
=
avctx
;
common_init
(
h
);
h
->
width
=
h
->
avctx
->
width
;
h
->
height
=
h
->
avctx
->
height
;
h
->
bit_depth_luma
=
8
;
h
->
chroma_format_idc
=
1
;
ff_h264dsp_init
(
&
h
->
h264dsp
,
8
,
1
);
ff_h264chroma_init
(
&
h
->
h264chroma
,
h
->
sps
.
bit_depth_chroma
);
ff_h264qpel_init
(
&
h
->
h264qpel
,
8
);
ff_h264_pred_init
(
&
h
->
hpc
,
h
->
avctx
->
codec_id
,
8
,
1
);
h
->
dequant_coeff_pps
=
-
1
;
/* needed so that IDCT permutation is known early */
ff_dsputil_init
(
&
h
->
dsp
,
h
->
avctx
);
ff_videodsp_init
(
&
h
->
vdsp
,
8
);
memset
(
h
->
pps
.
scaling_matrix4
,
16
,
6
*
16
*
sizeof
(
uint8_t
));
memset
(
h
->
pps
.
scaling_matrix8
,
16
,
2
*
64
*
sizeof
(
uint8_t
));
h
->
picture_structure
=
PICT_FRAME
;
h
->
slice_context_count
=
1
;
...
...
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