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
422418b6
Commit
422418b6
authored
Jun 01, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnxhd: replace asserts by av_asserts
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e6866b1c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
dnxhdenc.c
libavcodec/dnxhdenc.c
+8
-8
No files found.
libavcodec/dnxhdenc.c
View file @
422418b6
...
@@ -127,7 +127,7 @@ static int dnxhd_init_vlc(DNXHDEncContext *ctx)
...
@@ -127,7 +127,7 @@ static int dnxhd_init_vlc(DNXHDEncContext *ctx)
if
(
ctx
->
cid_table
->
ac_level
[
j
]
>>
1
==
alevel
&&
if
(
ctx
->
cid_table
->
ac_level
[
j
]
>>
1
==
alevel
&&
(
!
offset
||
(
ctx
->
cid_table
->
ac_flags
[
j
]
&
1
)
&&
offset
)
&&
(
!
offset
||
(
ctx
->
cid_table
->
ac_flags
[
j
]
&
1
)
&&
offset
)
&&
(
!
run
||
(
ctx
->
cid_table
->
ac_flags
[
j
]
&
2
)
&&
run
))
{
(
!
run
||
(
ctx
->
cid_table
->
ac_flags
[
j
]
&
2
)
&&
run
))
{
a
ssert
(
!
ctx
->
vlc_codes
[
index
]);
a
v_assert1
(
!
ctx
->
vlc_codes
[
index
]);
if
(
alevel
)
{
if
(
alevel
)
{
ctx
->
vlc_codes
[
index
]
=
(
ctx
->
cid_table
->
ac_codes
[
j
]
<<
1
)
|
(
sign
&
1
);
ctx
->
vlc_codes
[
index
]
=
(
ctx
->
cid_table
->
ac_codes
[
j
]
<<
1
)
|
(
sign
&
1
);
ctx
->
vlc_bits
[
index
]
=
ctx
->
cid_table
->
ac_bits
[
j
]
+
1
;
ctx
->
vlc_bits
[
index
]
=
ctx
->
cid_table
->
ac_bits
[
j
]
+
1
;
...
@@ -138,7 +138,7 @@ static int dnxhd_init_vlc(DNXHDEncContext *ctx)
...
@@ -138,7 +138,7 @@ static int dnxhd_init_vlc(DNXHDEncContext *ctx)
break
;
break
;
}
}
}
}
a
ssert
(
!
alevel
||
j
<
257
);
a
v_assert0
(
!
alevel
||
j
<
257
);
if
(
offset
)
{
if
(
offset
)
{
ctx
->
vlc_codes
[
index
]
=
(
ctx
->
vlc_codes
[
index
]
<<
ctx
->
cid_table
->
index_bits
)
|
offset
;
ctx
->
vlc_codes
[
index
]
=
(
ctx
->
vlc_codes
[
index
]
<<
ctx
->
cid_table
->
index_bits
)
|
offset
;
ctx
->
vlc_bits
[
index
]
+=
ctx
->
cid_table
->
index_bits
;
ctx
->
vlc_bits
[
index
]
+=
ctx
->
cid_table
->
index_bits
;
...
@@ -147,7 +147,7 @@ static int dnxhd_init_vlc(DNXHDEncContext *ctx)
...
@@ -147,7 +147,7 @@ static int dnxhd_init_vlc(DNXHDEncContext *ctx)
}
}
for
(
i
=
0
;
i
<
62
;
i
++
)
{
for
(
i
=
0
;
i
<
62
;
i
++
)
{
int
run
=
ctx
->
cid_table
->
run
[
i
];
int
run
=
ctx
->
cid_table
->
run
[
i
];
a
ssert
(
run
<
63
);
a
v_assert0
(
run
<
63
);
ctx
->
run_codes
[
run
]
=
ctx
->
cid_table
->
run_codes
[
i
];
ctx
->
run_codes
[
run
]
=
ctx
->
cid_table
->
run_codes
[
i
];
ctx
->
run_bits
[
run
]
=
ctx
->
cid_table
->
run_bits
[
i
];
ctx
->
run_bits
[
run
]
=
ctx
->
cid_table
->
run_bits
[
i
];
}
}
...
@@ -542,7 +542,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i
...
@@ -542,7 +542,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i
if
(
diff
<
0
)
nbits
=
av_log2_16bit
(
-
2
*
diff
);
if
(
diff
<
0
)
nbits
=
av_log2_16bit
(
-
2
*
diff
);
else
nbits
=
av_log2_16bit
(
2
*
diff
);
else
nbits
=
av_log2_16bit
(
2
*
diff
);
a
ssert
(
nbits
<
ctx
->
cid_table
->
bit_depth
+
4
);
a
v_assert1
(
nbits
<
ctx
->
cid_table
->
bit_depth
+
4
);
dc_bits
+=
ctx
->
cid_table
->
dc_bits
[
nbits
]
+
nbits
;
dc_bits
+=
ctx
->
cid_table
->
dc_bits
[
nbits
]
+
nbits
;
ctx
->
m
.
last_dc
[
n
]
=
block
[
0
];
ctx
->
m
.
last_dc
[
n
]
=
block
[
0
];
...
@@ -810,13 +810,13 @@ static void radix_count(const RCCMPEntry *data, int size, int buckets[RADIX_PASS
...
@@ -810,13 +810,13 @@ static void radix_count(const RCCMPEntry *data, int size, int buckets[RADIX_PASS
buckets
[
j
][
get_bucket
(
v
,
0
)]
++
;
buckets
[
j
][
get_bucket
(
v
,
0
)]
++
;
v
>>=
BUCKET_BITS
;
v
>>=
BUCKET_BITS
;
}
}
a
ssert
(
!
v
);
a
v_assert1
(
!
v
);
}
}
for
(
j
=
0
;
j
<
RADIX_PASSES
;
j
++
)
{
for
(
j
=
0
;
j
<
RADIX_PASSES
;
j
++
)
{
int
offset
=
size
;
int
offset
=
size
;
for
(
i
=
NBUCKETS
-
1
;
i
>=
0
;
i
--
)
for
(
i
=
NBUCKETS
-
1
;
i
>=
0
;
i
--
)
buckets
[
j
][
i
]
=
offset
-=
buckets
[
j
][
i
];
buckets
[
j
][
i
]
=
offset
-=
buckets
[
j
][
i
];
a
ssert
(
!
buckets
[
j
][
0
]);
a
v_assert1
(
!
buckets
[
j
][
0
]);
}
}
}
}
...
@@ -941,12 +941,12 @@ static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -941,12 +941,12 @@ static int dnxhd_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
for
(
i
=
0
;
i
<
ctx
->
m
.
mb_height
;
i
++
)
{
for
(
i
=
0
;
i
<
ctx
->
m
.
mb_height
;
i
++
)
{
AV_WB32
(
ctx
->
msip
+
i
*
4
,
offset
);
AV_WB32
(
ctx
->
msip
+
i
*
4
,
offset
);
offset
+=
ctx
->
slice_size
[
i
];
offset
+=
ctx
->
slice_size
[
i
];
a
ssert
(
!
(
ctx
->
slice_size
[
i
]
&
3
));
a
v_assert1
(
!
(
ctx
->
slice_size
[
i
]
&
3
));
}
}
avctx
->
execute2
(
avctx
,
dnxhd_encode_thread
,
buf
,
NULL
,
ctx
->
m
.
mb_height
);
avctx
->
execute2
(
avctx
,
dnxhd_encode_thread
,
buf
,
NULL
,
ctx
->
m
.
mb_height
);
a
ssert
(
640
+
offset
+
4
<=
ctx
->
cid_table
->
coding_unit_size
);
a
v_assert1
(
640
+
offset
+
4
<=
ctx
->
cid_table
->
coding_unit_size
);
memset
(
buf
+
640
+
offset
,
0
,
ctx
->
cid_table
->
coding_unit_size
-
4
-
offset
-
640
);
memset
(
buf
+
640
+
offset
,
0
,
ctx
->
cid_table
->
coding_unit_size
-
4
-
offset
-
640
);
AV_WB32
(
buf
+
ctx
->
cid_table
->
coding_unit_size
-
4
,
0x600DC0DE
);
// EOF
AV_WB32
(
buf
+
ctx
->
cid_table
->
coding_unit_size
-
4
,
0x600DC0DE
);
// EOF
...
...
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