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
05afc5f5
Commit
05afc5f5
authored
Apr 04, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dv: Move static tables only used in one place to where they are used.
parent
aff01de6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
32 deletions
+33
-32
dv.c
libavcodec/dv.c
+31
-0
dvdec.c
libavcodec/dvdec.c
+2
-0
dvquant.h
libavcodec/dvquant.h
+0
-32
No files found.
libavcodec/dv.c
View file @
05afc5f5
...
@@ -167,6 +167,15 @@ static inline void dv_calc_mb_coordinates(const DVprofile *d, int chan, int seq,
...
@@ -167,6 +167,15 @@ static inline void dv_calc_mb_coordinates(const DVprofile *d, int chan, int seq,
}
}
}
}
/* quantization quanta by QNO for DV100 */
static
const
uint8_t
dv100_qstep
[
16
]
=
{
1
,
/* QNO = 0 and 1 both have no quantization */
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
16
,
18
,
20
,
22
,
24
,
28
,
52
};
static
const
uint8_t
dv_quant_areas
[
4
]
=
{
6
,
21
,
43
,
64
};
int
ff_dv_init_dynamic_tables
(
const
DVprofile
*
d
)
int
ff_dv_init_dynamic_tables
(
const
DVprofile
*
d
)
{
{
int
j
,
i
,
c
,
s
,
p
;
int
j
,
i
,
c
,
s
,
p
;
...
@@ -467,6 +476,28 @@ static av_always_inline int dv_guess_dct_mode(DVVideoContext *s, uint8_t *data,
...
@@ -467,6 +476,28 @@ static av_always_inline int dv_guess_dct_mode(DVVideoContext *s, uint8_t *data,
return
0
;
return
0
;
}
}
static
const
int
dv_weight_bits
=
18
;
static
const
int
dv_weight_88
[
64
]
=
{
131072
,
257107
,
257107
,
242189
,
252167
,
242189
,
235923
,
237536
,
237536
,
235923
,
229376
,
231390
,
223754
,
231390
,
229376
,
222935
,
224969
,
217965
,
217965
,
224969
,
222935
,
200636
,
218652
,
211916
,
212325
,
211916
,
218652
,
200636
,
188995
,
196781
,
205965
,
206433
,
206433
,
205965
,
196781
,
188995
,
185364
,
185364
,
200636
,
200704
,
200636
,
185364
,
185364
,
174609
,
180568
,
195068
,
195068
,
180568
,
174609
,
170091
,
175557
,
189591
,
175557
,
170091
,
165371
,
170627
,
170627
,
165371
,
160727
,
153560
,
160727
,
144651
,
144651
,
136258
,
};
static
const
int
dv_weight_248
[
64
]
=
{
131072
,
242189
,
257107
,
237536
,
229376
,
200636
,
242189
,
223754
,
224969
,
196781
,
262144
,
242189
,
229376
,
200636
,
257107
,
237536
,
211916
,
185364
,
235923
,
217965
,
229376
,
211916
,
206433
,
180568
,
242189
,
223754
,
224969
,
196781
,
211916
,
185364
,
235923
,
217965
,
200704
,
175557
,
222935
,
205965
,
200636
,
185364
,
195068
,
170627
,
229376
,
211916
,
206433
,
180568
,
200704
,
175557
,
222935
,
205965
,
175557
,
153560
,
188995
,
174609
,
165371
,
144651
,
200636
,
185364
,
195068
,
170627
,
175557
,
153560
,
188995
,
174609
,
165371
,
144651
,
};
static
av_always_inline
int
dv_init_enc_block
(
EncBlockInfo
*
bi
,
uint8_t
*
data
,
int
linesize
,
DVVideoContext
*
s
,
int
bias
)
static
av_always_inline
int
dv_init_enc_block
(
EncBlockInfo
*
bi
,
uint8_t
*
data
,
int
linesize
,
DVVideoContext
*
s
,
int
bias
)
{
{
const
int
*
weight
;
const
int
*
weight
;
...
...
libavcodec/dvdec.c
View file @
05afc5f5
...
@@ -54,6 +54,8 @@ typedef struct BlockInfo {
...
@@ -54,6 +54,8 @@ typedef struct BlockInfo {
int
shift_offset
;
int
shift_offset
;
}
BlockInfo
;
}
BlockInfo
;
static
const
int
dv_iweight_bits
=
14
;
/* decode AC coefficients */
/* decode AC coefficients */
static
void
dv_decode_ac
(
GetBitContext
*
gb
,
BlockInfo
*
mb
,
DCTELEM
*
block
)
static
void
dv_decode_ac
(
GetBitContext
*
gb
,
BlockInfo
*
mb
,
DCTELEM
*
block
)
{
{
...
...
libavcodec/dvquant.h
View file @
05afc5f5
...
@@ -56,39 +56,7 @@ static const uint8_t dv_quant_shifts[22][4] = {
...
@@ -56,39 +56,7 @@ static const uint8_t dv_quant_shifts[22][4] = {
};
};
static
const
uint8_t
dv_quant_offset
[
4
]
=
{
6
,
3
,
0
,
1
};
static
const
uint8_t
dv_quant_offset
[
4
]
=
{
6
,
3
,
0
,
1
};
static
const
uint8_t
dv_quant_areas
[
4
]
=
{
6
,
21
,
43
,
64
};
/* quantization quanta by QNO for DV100 */
static
const
uint8_t
dv100_qstep
[
16
]
=
{
1
,
/* QNO = 0 and 1 both have no quantization */
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
16
,
18
,
20
,
22
,
24
,
28
,
52
};
/* DV25/50 DCT coefficient weights and inverse weights */
/* created by dvtables.py */
static
const
int
dv_weight_bits
=
18
;
static
const
int
dv_weight_88
[
64
]
=
{
131072
,
257107
,
257107
,
242189
,
252167
,
242189
,
235923
,
237536
,
237536
,
235923
,
229376
,
231390
,
223754
,
231390
,
229376
,
222935
,
224969
,
217965
,
217965
,
224969
,
222935
,
200636
,
218652
,
211916
,
212325
,
211916
,
218652
,
200636
,
188995
,
196781
,
205965
,
206433
,
206433
,
205965
,
196781
,
188995
,
185364
,
185364
,
200636
,
200704
,
200636
,
185364
,
185364
,
174609
,
180568
,
195068
,
195068
,
180568
,
174609
,
170091
,
175557
,
189591
,
175557
,
170091
,
165371
,
170627
,
170627
,
165371
,
160727
,
153560
,
160727
,
144651
,
144651
,
136258
,
};
static
const
int
dv_weight_248
[
64
]
=
{
131072
,
242189
,
257107
,
237536
,
229376
,
200636
,
242189
,
223754
,
224969
,
196781
,
262144
,
242189
,
229376
,
200636
,
257107
,
237536
,
211916
,
185364
,
235923
,
217965
,
229376
,
211916
,
206433
,
180568
,
242189
,
223754
,
224969
,
196781
,
211916
,
185364
,
235923
,
217965
,
200704
,
175557
,
222935
,
205965
,
200636
,
185364
,
195068
,
170627
,
229376
,
211916
,
206433
,
180568
,
200704
,
175557
,
222935
,
205965
,
175557
,
153560
,
188995
,
174609
,
165371
,
144651
,
200636
,
185364
,
195068
,
170627
,
175557
,
153560
,
188995
,
174609
,
165371
,
144651
,
};
static
const
int
dv_iweight_bits
=
14
;
static
const
int
dv_iweight_88
[
64
]
=
{
static
const
int
dv_iweight_88
[
64
]
=
{
32768
,
16710
,
16710
,
17735
,
17015
,
17735
,
18197
,
18079
,
32768
,
16710
,
16710
,
17735
,
17015
,
17735
,
18197
,
18079
,
18079
,
18197
,
18725
,
18559
,
19196
,
18559
,
18725
,
19284
,
18079
,
18197
,
18725
,
18559
,
19196
,
18559
,
18725
,
19284
,
...
...
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