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
6cb1d361
Commit
6cb1d361
authored
Oct 08, 2007
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo weigth->weight
Originally committed as revision 10687 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
cd52a9ca
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
23 deletions
+23
-23
dnxhddata.c
libavcodec/dnxhddata.c
+12
-12
dnxhddata.h
libavcodec/dnxhddata.h
+1
-1
dnxhddec.c
libavcodec/dnxhddec.c
+2
-2
dnxhdenc.c
libavcodec/dnxhdenc.c
+8
-8
No files found.
libavcodec/dnxhddata.c
View file @
6cb1d361
...
...
@@ -21,7 +21,7 @@
#include "dnxhddata.h"
static
const
uint8_t
dnxhd_1237_luma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1237_luma_weig
ht
[]
=
{
0
,
32
,
33
,
34
,
34
,
36
,
37
,
36
,
36
,
37
,
38
,
38
,
38
,
39
,
41
,
44
,
43
,
41
,
40
,
41
,
46
,
49
,
47
,
46
,
...
...
@@ -32,7 +32,7 @@ static const uint8_t dnxhd_1237_luma_weigth[] = {
97
,
100
,
104
,
102
,
98
,
98
,
99
,
99
,
};
static
const
uint8_t
dnxhd_1237_chroma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1237_chroma_weig
ht
[]
=
{
0
,
32
,
36
,
39
,
39
,
38
,
39
,
41
,
45
,
51
,
57
,
58
,
53
,
48
,
47
,
51
,
55
,
58
,
66
,
75
,
81
,
83
,
82
,
78
,
...
...
@@ -43,7 +43,7 @@ static const uint8_t dnxhd_1237_chroma_weigth[] = {
97
,
100
,
104
,
102
,
98
,
98
,
99
,
99
,
};
static
const
uint8_t
dnxhd_1238_luma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1238_luma_weig
ht
[]
=
{
0
,
32
,
32
,
33
,
34
,
33
,
33
,
33
,
33
,
33
,
33
,
33
,
33
,
35
,
37
,
37
,
36
,
36
,
35
,
36
,
38
,
38
,
36
,
35
,
...
...
@@ -54,7 +54,7 @@ static const uint8_t dnxhd_1238_luma_weigth[] = {
51
,
53
,
55
,
57
,
58
,
59
,
57
,
57
,
};
static
const
uint8_t
dnxhd_1238_chroma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1238_chroma_weig
ht
[]
=
{
0
,
32
,
35
,
35
,
35
,
34
,
34
,
35
,
39
,
43
,
45
,
45
,
41
,
39
,
40
,
41
,
42
,
44
,
48
,
55
,
59
,
63
,
65
,
59
,
...
...
@@ -87,7 +87,7 @@ static const uint8_t dnxhd_1241_chroma_weight[] = {
48
,
46
,
48
,
49
,
48
,
49
,
49
,
49
,
};
static
const
uint8_t
dnxhd_1242_luma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1242_luma_weig
ht
[]
=
{
0
,
32
,
33
,
33
,
34
,
35
,
36
,
35
,
33
,
33
,
35
,
36
,
37
,
37
,
38
,
37
,
37
,
37
,
36
,
37
,
37
,
37
,
38
,
39
,
...
...
@@ -98,7 +98,7 @@ static const uint8_t dnxhd_1242_luma_weigth[] = {
49
,
51
,
52
,
51
,
49
,
47
,
47
,
47
,
};
static
const
uint8_t
dnxhd_1242_chroma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1242_chroma_weig
ht
[]
=
{
0
,
32
,
37
,
42
,
45
,
45
,
45
,
44
,
38
,
37
,
40
,
42
,
44
,
49
,
51
,
47
,
41
,
40
,
43
,
44
,
46
,
48
,
51
,
54
,
...
...
@@ -109,7 +109,7 @@ static const uint8_t dnxhd_1242_chroma_weigth[] = {
55
,
59
,
63
,
62
,
60
,
60
,
60
,
60
,
};
static
const
uint8_t
dnxhd_1243_luma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1243_luma_weig
ht
[]
=
{
0
,
32
,
32
,
33
,
33
,
35
,
35
,
35
,
35
,
35
,
35
,
35
,
34
,
35
,
38
,
40
,
39
,
37
,
37
,
37
,
36
,
35
,
36
,
38
,
...
...
@@ -120,7 +120,7 @@ static const uint8_t dnxhd_1243_luma_weigth[] = {
46
,
44
,
45
,
47
,
47
,
48
,
47
,
47
,
};
static
const
uint8_t
dnxhd_1243_chroma_weig
th
[]
=
{
static
const
uint8_t
dnxhd_1243_chroma_weig
ht
[]
=
{
0
,
32
,
36
,
37
,
36
,
37
,
39
,
39
,
41
,
43
,
43
,
42
,
41
,
41
,
41
,
42
,
43
,
43
,
43
,
44
,
44
,
44
,
46
,
47
,
...
...
@@ -252,13 +252,13 @@ static const uint8_t dnxhd_1241_run[62] = {
const
CIDEntry
ff_dnxhd_cid_table
[]
=
{
{
1237
,
1920
,
1080
,
0
,
606208
,
606208
,
4
,
8
,
dnxhd_1237_luma_weig
th
,
dnxhd_1237_chroma_weigth
,
dnxhd_1237_luma_weig
ht
,
dnxhd_1237_chroma_weight
,
dnxhd_1237_dc_codes
,
dnxhd_1237_dc_bits
,
dnxhd_1237_ac_codes
,
dnxhd_1237_ac_bits
,
dnxhd_1237_ac_level
,
dnxhd_1237_ac_run_flag
,
dnxhd_1237_ac_index_flag
,
dnxhd_1237_run_codes
,
dnxhd_1237_run_bits
,
dnxhd_1237_run
},
{
1238
,
1920
,
1080
,
0
,
917504
,
917504
,
4
,
8
,
dnxhd_1238_luma_weig
th
,
dnxhd_1238_chroma_weigth
,
dnxhd_1238_luma_weig
ht
,
dnxhd_1238_chroma_weight
,
dnxhd_1238_dc_codes
,
dnxhd_1238_dc_bits
,
dnxhd_1238_ac_codes
,
dnxhd_1238_ac_bits
,
dnxhd_1238_ac_level
,
dnxhd_1238_ac_run_flag
,
dnxhd_1238_ac_index_flag
,
...
...
@@ -270,13 +270,13 @@ const CIDEntry ff_dnxhd_cid_table[] = {
dnxhd_1241_ac_run_flag
,
dnxhd_1241_ac_index_flag
,
dnxhd_1241_run_codes
,
dnxhd_1241_run_bits
,
dnxhd_1241_run
},
{
1242
,
1920
,
1080
,
1
,
606208
,
303104
,
4
,
8
,
dnxhd_1242_luma_weig
th
,
dnxhd_1242_chroma_weigth
,
dnxhd_1242_luma_weig
ht
,
dnxhd_1242_chroma_weight
,
dnxhd_1237_dc_codes
,
dnxhd_1237_dc_bits
,
dnxhd_1237_ac_codes
,
dnxhd_1237_ac_bits
,
dnxhd_1237_ac_level
,
dnxhd_1237_ac_run_flag
,
dnxhd_1237_ac_index_flag
,
dnxhd_1237_run_codes
,
dnxhd_1237_run_bits
,
dnxhd_1237_run
},
{
1243
,
1920
,
1080
,
1
,
917504
,
458752
,
4
,
8
,
dnxhd_1243_luma_weig
th
,
dnxhd_1243_chroma_weigth
,
dnxhd_1243_luma_weig
ht
,
dnxhd_1243_chroma_weight
,
dnxhd_1238_dc_codes
,
dnxhd_1238_dc_bits
,
dnxhd_1238_ac_codes
,
dnxhd_1238_ac_bits
,
dnxhd_1238_ac_level
,
dnxhd_1238_ac_run_flag
,
dnxhd_1238_ac_index_flag
,
...
...
libavcodec/dnxhddata.h
View file @
6cb1d361
...
...
@@ -32,7 +32,7 @@ typedef struct {
unsigned
int
coding_unit_size
;
int
index_bits
;
int
bit_depth
;
const
uint8_t
*
luma_weig
th
,
*
chroma_weigth
;
const
uint8_t
*
luma_weig
ht
,
*
chroma_weight
;
const
uint8_t
*
dc_codes
,
*
dc_bits
;
const
uint16_t
*
ac_codes
;
const
uint8_t
*
ac_bits
,
*
ac_level
;
...
...
libavcodec/dnxhddec.c
View file @
6cb1d361
...
...
@@ -161,10 +161,10 @@ static void dnxhd_decode_dct_block(DNXHDContext *ctx, DCTELEM *block, int n, int
if
(
n
&
2
)
{
component
=
1
+
(
n
&
1
);
weigth_matrix
=
ctx
->
cid_table
->
chroma_weig
th
;
weigth_matrix
=
ctx
->
cid_table
->
chroma_weig
ht
;
}
else
{
component
=
0
;
weigth_matrix
=
ctx
->
cid_table
->
luma_weig
th
;
weigth_matrix
=
ctx
->
cid_table
->
luma_weig
ht
;
}
ctx
->
last_dc
[
component
]
+=
dnxhd_decode_dc
(
ctx
);
...
...
libavcodec/dnxhdenc.c
View file @
6cb1d361
...
...
@@ -130,13 +130,13 @@ static int dnxhd_init_qmat(DNXHDEncContext *ctx, int lbias, int cbias)
for
(
i
=
1
;
i
<
64
;
i
++
)
{
int
j
=
ctx
->
m
.
dsp
.
idct_permutation
[
ff_zigzag_direct
[
i
]];
weight_matrix
[
j
]
=
ctx
->
cid_table
->
luma_weig
th
[
i
];
weight_matrix
[
j
]
=
ctx
->
cid_table
->
luma_weig
ht
[
i
];
}
ff_convert_matrix
(
&
ctx
->
m
.
dsp
,
ctx
->
qmatrix_l
,
ctx
->
qmatrix_l16
,
weight_matrix
,
ctx
->
m
.
intra_quant_bias
,
1
,
ctx
->
m
.
avctx
->
qmax
,
1
);
for
(
i
=
1
;
i
<
64
;
i
++
)
{
int
j
=
ctx
->
m
.
dsp
.
idct_permutation
[
ff_zigzag_direct
[
i
]];
weight_matrix
[
j
]
=
ctx
->
cid_table
->
chroma_weig
th
[
i
];
weight_matrix
[
j
]
=
ctx
->
cid_table
->
chroma_weig
ht
[
i
];
}
ff_convert_matrix
(
&
ctx
->
m
.
dsp
,
ctx
->
qmatrix_c
,
ctx
->
qmatrix_c16
,
weight_matrix
,
ctx
->
m
.
intra_quant_bias
,
1
,
ctx
->
m
.
avctx
->
qmax
,
1
);
...
...
@@ -327,25 +327,25 @@ static av_always_inline void dnxhd_encode_block(DNXHDEncContext *ctx, DCTELEM *b
static
av_always_inline
void
dnxhd_unquantize_c
(
DNXHDEncContext
*
ctx
,
DCTELEM
*
block
,
int
n
,
int
qscale
,
int
last_index
)
{
const
uint8_t
*
weig
th
_matrix
;
const
uint8_t
*
weig
ht
_matrix
;
int
level
;
int
i
;
weig
th_matrix
=
(
n
&
2
)
?
ctx
->
cid_table
->
chroma_weigth
:
ctx
->
cid_table
->
luma_weigth
;
weig
ht_matrix
=
(
n
&
2
)
?
ctx
->
cid_table
->
chroma_weight
:
ctx
->
cid_table
->
luma_weight
;
for
(
i
=
1
;
i
<=
last_index
;
i
++
)
{
int
j
=
ctx
->
m
.
intra_scantable
.
permutated
[
i
];
level
=
block
[
j
];
if
(
level
)
{
if
(
level
<
0
)
{
level
=
(
1
-
2
*
level
)
*
qscale
*
weig
th
_matrix
[
i
];
if
(
weig
th
_matrix
[
i
]
!=
32
)
level
=
(
1
-
2
*
level
)
*
qscale
*
weig
ht
_matrix
[
i
];
if
(
weig
ht
_matrix
[
i
]
!=
32
)
level
+=
32
;
level
>>=
6
;
level
=
-
level
;
}
else
{
level
=
(
2
*
level
+
1
)
*
qscale
*
weig
th
_matrix
[
i
];
if
(
weig
th
_matrix
[
i
]
!=
32
)
level
=
(
2
*
level
+
1
)
*
qscale
*
weig
ht
_matrix
[
i
];
if
(
weig
ht
_matrix
[
i
]
!=
32
)
level
+=
32
;
level
>>=
6
;
}
...
...
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