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
89a6c32b
Commit
89a6c32b
authored
Oct 19, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atrac3: use sizeof(variable) instead of sizeof(type)
parent
327747de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
atrac3.c
libavcodec/atrac3.c
+7
-6
No files found.
libavcodec/atrac3.c
View file @
89a6c32b
...
@@ -311,13 +311,13 @@ static int decode_spectrum(GetBitContext *gb, float *output)
...
@@ -311,13 +311,13 @@ static int decode_spectrum(GetBitContext *gb, float *output)
output
[
first
]
=
mantissas
[
j
]
*
scale_factor
;
output
[
first
]
=
mantissas
[
j
]
*
scale_factor
;
}
else
{
}
else
{
/* this subband was not coded, so zero the entire subband */
/* this subband was not coded, so zero the entire subband */
memset
(
output
+
first
,
0
,
subband_size
*
sizeof
(
floa
t
));
memset
(
output
+
first
,
0
,
subband_size
*
sizeof
(
*
outpu
t
));
}
}
}
}
/* clear the subbands that were not coded */
/* clear the subbands that were not coded */
first
=
subband_tab
[
i
];
first
=
subband_tab
[
i
];
memset
(
output
+
first
,
0
,
(
SAMPLES_PER_FRAME
-
first
)
*
sizeof
(
floa
t
));
memset
(
output
+
first
,
0
,
(
SAMPLES_PER_FRAME
-
first
)
*
sizeof
(
*
outpu
t
));
return
num_subbands
;
return
num_subbands
;
}
}
...
@@ -494,7 +494,7 @@ static void gain_compensate_and_overlap(float *input, float *prev,
...
@@ -494,7 +494,7 @@ static void gain_compensate_and_overlap(float *input, float *prev,
}
}
/* Delay for the overlapping part. */
/* Delay for the overlapping part. */
memcpy
(
prev
,
&
input
[
256
],
256
*
sizeof
(
float
));
memcpy
(
prev
,
&
input
[
256
],
256
*
sizeof
(
*
prev
));
}
}
/*
/*
...
@@ -684,7 +684,7 @@ static int decode_channel_sound_unit(ATRAC3Context *q, GetBitContext *gb,
...
@@ -684,7 +684,7 @@ static int decode_channel_sound_unit(ATRAC3Context *q, GetBitContext *gb,
if
(
band
<=
num_bands
)
if
(
band
<=
num_bands
)
imlt
(
q
,
&
snd
->
spectrum
[
band
*
256
],
snd
->
imdct_buf
,
band
&
1
);
imlt
(
q
,
&
snd
->
spectrum
[
band
*
256
],
snd
->
imdct_buf
,
band
&
1
);
else
else
memset
(
snd
->
imdct_buf
,
0
,
512
*
sizeof
(
float
));
memset
(
snd
->
imdct_buf
,
0
,
512
*
sizeof
(
*
snd
->
imdct_buf
));
/* gain compensation and overlapping */
/* gain compensation and overlapping */
gain_compensate_and_overlap
(
snd
->
imdct_buf
,
gain_compensate_and_overlap
(
snd
->
imdct_buf
,
...
@@ -742,7 +742,8 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *databuf,
...
@@ -742,7 +742,8 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *databuf,
init_get_bits
(
&
q
->
gb
,
ptr1
,
avctx
->
block_align
*
8
);
init_get_bits
(
&
q
->
gb
,
ptr1
,
avctx
->
block_align
*
8
);
/* Fill the Weighting coeffs delay buffer */
/* Fill the Weighting coeffs delay buffer */
memmove
(
q
->
weighting_delay
,
&
q
->
weighting_delay
[
2
],
4
*
sizeof
(
int
));
memmove
(
q
->
weighting_delay
,
&
q
->
weighting_delay
[
2
],
4
*
sizeof
(
*
q
->
weighting_delay
));
q
->
weighting_delay
[
4
]
=
get_bits1
(
&
q
->
gb
);
q
->
weighting_delay
[
4
]
=
get_bits1
(
&
q
->
gb
);
q
->
weighting_delay
[
5
]
=
get_bits
(
&
q
->
gb
,
3
);
q
->
weighting_delay
[
5
]
=
get_bits
(
&
q
->
gb
,
3
);
...
@@ -982,7 +983,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
...
@@ -982,7 +983,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
avpriv_float_dsp_init
(
&
q
->
fdsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
avpriv_float_dsp_init
(
&
q
->
fdsp
,
avctx
->
flags
&
CODEC_FLAG_BITEXACT
);
ff_fmt_convert_init
(
&
q
->
fmt_conv
,
avctx
);
ff_fmt_convert_init
(
&
q
->
fmt_conv
,
avctx
);
q
->
units
=
av_mallocz
(
sizeof
(
ChannelUnit
)
*
avctx
->
channels
);
q
->
units
=
av_mallocz
(
sizeof
(
*
q
->
units
)
*
avctx
->
channels
);
if
(
!
q
->
units
)
{
if
(
!
q
->
units
)
{
atrac3_decode_close
(
avctx
);
atrac3_decode_close
(
avctx
);
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
...
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