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
50f8c265
Commit
50f8c265
authored
Jul 05, 2011
by
Clément Bœsch
Committed by
Clément Bœsch
Jul 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dv: fix comment spelling.
parent
16a565d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
dv.c
libavcodec/dv.c
+9
-10
No files found.
libavcodec/dv.c
View file @
50f8c265
...
...
@@ -370,7 +370,6 @@ typedef struct BlockInfo {
/* bit budget for AC only in 5 MBs */
static
const
int
vs_total_ac_bits
=
(
100
*
4
+
68
*
2
)
*
5
;
/* see dv_88_areas and dv_248_areas for details */
static
const
int
mb_area_start
[
5
]
=
{
1
,
6
,
21
,
43
,
64
};
static
inline
int
put_bits_left
(
PutBitContext
*
s
)
...
...
@@ -378,7 +377,7 @@ static inline int put_bits_left(PutBitContext* s)
return
(
s
->
buf_end
-
s
->
buf
)
*
8
-
put_bits_count
(
s
);
}
/* decode
ac
coefficients */
/* decode
AC
coefficients */
static
void
dv_decode_ac
(
GetBitContext
*
gb
,
BlockInfo
*
mb
,
DCTELEM
*
block
)
{
int
last_index
=
gb
->
size_in_bits
;
...
...
@@ -391,7 +390,7 @@ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
OPEN_READER
(
re
,
gb
);
UPDATE_CACHE
(
re
,
gb
);
/* if we must parse a partial
vlc
, we do it here */
/* if we must parse a partial
VLC
, we do it here */
if
(
partial_bit_count
>
0
)
{
re_cache
=
((
unsigned
)
re_cache
>>
partial_bit_count
)
|
(
mb
->
partial_bit_buffer
<<
(
sizeof
(
re_cache
)
*
8
-
partial_bit_count
));
...
...
@@ -486,7 +485,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
memset
(
sblock
,
0
,
5
*
DV_MAX_BPM
*
sizeof
(
*
sblock
));
/* pass 1
: read DC and AC coefficients in blocks */
/* pass 1: read DC and AC coefficients in blocks */
buf_ptr
=
&
s
->
buf
[
work_chunk
->
buf_offset
*
80
];
block1
=
&
sblock
[
0
][
0
];
mb1
=
mb_data
;
...
...
@@ -503,7 +502,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
last_index
=
s
->
sys
->
block_sizes
[
j
];
init_get_bits
(
&
gb
,
buf_ptr
,
last_index
);
/* get the
dc
*/
/* get the
DC
*/
dc
=
get_sbits
(
&
gb
,
9
);
dct_mode
=
get_bits1
(
&
gb
);
class1
=
get_bits
(
&
gb
,
2
);
...
...
@@ -530,7 +529,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
av_dlog
(
avctx
,
"MB block: %d, %d "
,
mb_index
,
j
);
dv_decode_ac
(
&
gb
,
mb
,
block
);
/* write the remaining bits
in a new buffer only if the
/* write the remaining bits in a new buffer only if the
block is finished */
if
(
mb
->
pos
>=
64
)
bit_copy
(
&
pb
,
&
gb
);
...
...
@@ -539,7 +538,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
mb
++
;
}
/* pass 2
: we can do it just after */
/* pass 2: we can do it just after */
av_dlog
(
avctx
,
"***pass 2 size=%d MB#=%d
\n
"
,
put_bits_count
(
&
pb
),
mb_index
);
block
=
block1
;
mb
=
mb1
;
...
...
@@ -559,7 +558,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
bit_copy
(
&
vs_pb
,
&
gb
);
}
/* we need a pass o
th
er the whole video segment */
/* we need a pass o
v
er the whole video segment */
av_dlog
(
avctx
,
"***pass 3 size=%d
\n
"
,
put_bits_count
(
&
vs_pb
));
block
=
&
sblock
[
0
][
0
];
mb
=
mb_data
;
...
...
@@ -640,7 +639,7 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg)
}
#if CONFIG_SMALL
/* Converts run and level (where level != 0) pair into
vlc
, returning bit size */
/* Converts run and level (where level != 0) pair into
VLC
, returning bit size */
static
av_always_inline
int
dv_rl2vlc
(
int
run
,
int
level
,
int
sign
,
uint32_t
*
vlc
)
{
int
size
;
...
...
@@ -817,7 +816,7 @@ static av_always_inline int dv_init_enc_block(EncBlockInfo* bi, uint8_t *data, i
if
(
level
+
15
>
30U
)
{
bi
->
sign
[
i
]
=
(
level
>>
31
)
&
1
;
/* weigh it and and shift down into range, adding for rounding */
/* weigh
t
it and and shift down into range, adding for rounding */
/* the extra division by a factor of 2^4 reverses the 8x expansion of the DCT
AND the 2x doubling of the weights */
level
=
(
FFABS
(
level
)
*
weight
[
i
]
+
(
1
<<
(
dv_weight_bits
+
3
)))
>>
(
dv_weight_bits
+
4
);
...
...
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