Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
7258b5eb
Commit
7258b5eb
authored
Sep 10, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dnxhdenc: Use FF_ALLOCZ_ARRAY_OR_GOTO()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
743d489c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
dnxhdenc.c
libavcodec/dnxhdenc.c
+15
-15
No files found.
libavcodec/dnxhdenc.c
View file @
7258b5eb
...
...
@@ -133,10 +133,10 @@ static av_cold int dnxhd_init_vlc(DNXHDEncContext *ctx)
int
i
,
j
,
level
,
run
;
int
max_level
=
1
<<
(
ctx
->
cid_table
->
bit_depth
+
2
);
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
vlc_codes
,
max_level
*
4
*
sizeof
(
*
ctx
->
vlc_codes
),
fail
);
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
vlc_bits
,
max_level
*
4
*
sizeof
(
*
ctx
->
vlc_bits
),
fail
);
FF_ALLOCZ_
ARRAY_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
vlc_codes
,
max_level
,
4
*
sizeof
(
*
ctx
->
vlc_codes
),
fail
);
FF_ALLOCZ_
ARRAY_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
vlc_bits
,
max_level
,
4
*
sizeof
(
*
ctx
->
vlc_bits
),
fail
);
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
run_codes
,
63
*
2
,
fail
);
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
run_bits
,
...
...
@@ -197,15 +197,15 @@ static av_cold int dnxhd_init_qmat(DNXHDEncContext *ctx, int lbias, int cbias)
const
uint8_t
*
luma_weight_table
=
ctx
->
cid_table
->
luma_weight
;
const
uint8_t
*
chroma_weight_table
=
ctx
->
cid_table
->
chroma_weight
;
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_l
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
*
64
*
sizeof
(
int
),
fail
);
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_c
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
*
64
*
sizeof
(
int
),
fail
);
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_l16
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
*
64
*
2
*
sizeof
(
uint16_t
),
FF_ALLOCZ_
ARRAY_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_l
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
,
64
*
sizeof
(
int
),
fail
);
FF_ALLOCZ_
ARRAY_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_c
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
,
64
*
sizeof
(
int
),
fail
);
FF_ALLOCZ_
ARRAY_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_l16
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
,
64
*
2
*
sizeof
(
uint16_t
),
fail
);
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_c16
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
*
64
*
2
*
sizeof
(
uint16_t
),
FF_ALLOCZ_
ARRAY_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
qmatrix_c16
,
(
ctx
->
m
.
avctx
->
qmax
+
1
)
,
64
*
2
*
sizeof
(
uint16_t
),
fail
);
if
(
ctx
->
cid_table
->
bit_depth
==
8
)
{
...
...
@@ -271,10 +271,10 @@ fail:
static
av_cold
int
dnxhd_init_rc
(
DNXHDEncContext
*
ctx
)
{
FF_ALLOCZ_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
mb_rc
,
8160
*
(
ctx
->
m
.
avctx
->
qmax
+
1
)
*
sizeof
(
RCEntry
),
fail
);
FF_ALLOCZ_
ARRAY_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
mb_rc
,
(
ctx
->
m
.
avctx
->
qmax
+
1
),
8160
*
sizeof
(
RCEntry
),
fail
);
if
(
ctx
->
m
.
avctx
->
mb_decision
!=
FF_MB_DECISION_RD
)
FF_ALLOCZ_OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
mb_cmp
,
ctx
->
m
.
mb_num
*
sizeof
(
RCCMPEntry
),
fail
);
FF_ALLOCZ_
ARRAY_
OR_GOTO
(
ctx
->
m
.
avctx
,
ctx
->
mb_cmp
,
ctx
->
m
.
mb_num
,
sizeof
(
RCCMPEntry
),
fail
);
ctx
->
frame_bits
=
(
ctx
->
cid_table
->
coding_unit_size
-
640
-
4
-
ctx
->
min_padding
)
*
8
;
...
...
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