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
6f6b0311
Commit
6f6b0311
authored
Sep 25, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: Drop some silly commented-out av_log() invocations
parent
72eaba5e
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
7 additions
and
64 deletions
+7
-64
aaccoder.c
libavcodec/aaccoder.c
+0
-3
adpcm.c
libavcodec/adpcm.c
+0
-1
cook.c
libavcodec/cook.c
+2
-7
dnxhddec.c
libavcodec/dnxhddec.c
+1
-9
golomb.h
libavcodec/golomb.h
+0
-2
h264_cabac.c
libavcodec/h264_cabac.c
+2
-11
imc.c
libavcodec/imc.c
+0
-2
mpegaudiodec.c
libavcodec/mpegaudiodec.c
+0
-5
mpegvideo.c
libavcodec/mpegvideo.c
+0
-1
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+0
-8
parser.c
libavcodec/parser.c
+0
-1
rv10.c
libavcodec/rv10.c
+1
-6
vc1.c
libavcodec/vc1.c
+0
-2
vorbis.c
libavcodec/vorbis.c
+1
-3
wmadec.c
libavcodec/wmadec.c
+0
-2
wmaenc.c
libavcodec/wmaenc.c
+0
-1
No files found.
libavcodec/aaccoder.c
View file @
6f6b0311
...
...
@@ -585,7 +585,6 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
q0
=
coef2minsf
(
q0f
);
//maximum scalefactor index is when maximum coefficient after quantizing is still not zero
q1
=
coef2maxsf
(
q1f
);
//av_log(NULL, AV_LOG_ERROR, "q0 %d, q1 %d\n", q0, q1);
if
(
q1
-
q0
>
60
)
{
int
q0low
=
q0
;
int
q1high
=
q1
;
...
...
@@ -593,7 +592,6 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
int
qnrg
=
av_clip_uint8
(
log2f
(
sqrtf
(
qnrgf
/
qcnt
))
*
4
-
31
+
SCALE_ONE_POS
-
SCALE_DIV_512
);
q1
=
qnrg
+
30
;
q0
=
qnrg
-
30
;
//av_log(NULL, AV_LOG_ERROR, "q0 %d, q1 %d\n", q0, q1);
if
(
q0
<
q0low
)
{
q1
+=
q0low
-
q0
;
q0
=
q0low
;
...
...
@@ -602,7 +600,6 @@ static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
q1
=
q1high
;
}
}
//av_log(NULL, AV_LOG_ERROR, "q0 %d, q1 %d\n", q0, q1);
for
(
i
=
0
;
i
<
TRELLIS_STATES
;
i
++
)
{
paths
[
0
][
i
].
cost
=
0
.
0
f
;
...
...
libavcodec/adpcm.c
View file @
6f6b0311
...
...
@@ -356,7 +356,6 @@ static void adpcm_swf_decode(AVCodecContext *avctx, const uint8_t *buf, int buf_
//read bits & initial values
nb_bits
=
get_bits
(
&
gb
,
2
)
+
2
;
//av_log(NULL,AV_LOG_INFO,"nb_bits: %d\n", nb_bits);
table
=
swf_index_tables
[
nb_bits
-
2
];
k0
=
1
<<
(
nb_bits
-
2
);
signmask
=
1
<<
(
nb_bits
-
1
);
...
...
libavcodec/cook.c
View file @
6f6b0311
...
...
@@ -420,11 +420,9 @@ static void categorize(COOKContext *q, COOKSubpacket *p, int *quant_index_table,
bits_left
=
p
->
bits_per_subpacket
-
get_bits_count
(
&
q
->
gb
);
if
(
bits_left
>
q
->
samples_per_channel
)
{
if
(
bits_left
>
q
->
samples_per_channel
)
bits_left
=
q
->
samples_per_channel
+
((
bits_left
-
q
->
samples_per_channel
)
*
5
)
/
8
;
//av_log(q->avctx, AV_LOG_ERROR, "bits_left = %d\n",bits_left);
}
bias
=
-
32
;
...
...
@@ -925,10 +923,7 @@ static int decode_subpacket(COOKContext *q, COOKSubpacket *p,
{
int
sub_packet_size
=
p
->
size
;
int
res
;
/* packet dump */
// for (i = 0; i < sub_packet_size ; i++)
// av_log(q->avctx, AV_LOG_ERROR, "%02x", inbuffer[i]);
// av_log(q->avctx, AV_LOG_ERROR, "\n");
memset
(
q
->
decode_buffer_1
,
0
,
sizeof
(
q
->
decode_buffer_1
));
decode_bytes_and_gain
(
q
,
p
,
inbuffer
,
&
p
->
gains1
);
...
...
libavcodec/dnxhddec.c
View file @
6f6b0311
...
...
@@ -208,18 +208,14 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
ctx
->
last_dc
[
component
]
+=
level
;
}
block
[
0
]
=
ctx
->
last_dc
[
component
];
//av_log(ctx->avctx, AV_LOG_DEBUG, "dc %d\n", block[0]);
for
(
i
=
1
;
;
i
++
)
{
UPDATE_CACHE
(
bs
,
&
ctx
->
gb
);
GET_VLC
(
index1
,
bs
,
&
ctx
->
gb
,
ctx
->
ac_vlc
.
table
,
DNXHD_VLC_BITS
,
2
);
//av_log(ctx->avctx, AV_LOG_DEBUG, "index %d\n", index1);
level
=
ctx
->
cid_table
->
ac_level
[
index1
];
if
(
!
level
)
{
/* EOB */
//av_log(ctx->avctx, AV_LOG_DEBUG, "EOB\n");
if
(
!
level
)
/* EOB */
break
;
}
sign
=
SHOW_SBITS
(
bs
,
&
ctx
->
gb
,
1
);
SKIP_BITS
(
bs
,
&
ctx
->
gb
,
1
);
...
...
@@ -242,14 +238,11 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx,
}
j
=
ctx
->
scantable
.
permutated
[
i
];
//av_log(ctx->avctx, AV_LOG_DEBUG, "j %d\n", j);
//av_log(ctx->avctx, AV_LOG_DEBUG, "level %d, weight %d\n", level, weight_matrix[i]);
level
=
(
2
*
level
+
1
)
*
qscale
*
weight_matrix
[
i
];
if
(
level_bias
<
32
||
weight_matrix
[
i
]
!=
level_bias
)
level
+=
level_bias
;
level
>>=
level_shift
;
//av_log(NULL, AV_LOG_DEBUG, "i %d, j %d, end level %d\n", i, j, level);
block
[
j
]
=
(
level
^
sign
)
-
sign
;
}
...
...
@@ -279,7 +272,6 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, int x, int y)
qscale
=
get_bits
(
&
ctx
->
gb
,
11
);
skip_bits1
(
&
ctx
->
gb
);
//av_log(ctx->avctx, AV_LOG_DEBUG, "qscale %d\n", qscale);
for
(
i
=
0
;
i
<
8
;
i
++
)
{
ctx
->
dsp
.
clear_block
(
ctx
->
blocks
[
i
]);
...
...
libavcodec/golomb.h
View file @
6f6b0311
...
...
@@ -463,8 +463,6 @@ static inline void set_te_golomb(PutBitContext *pb, int i, int range){
* write signed exp golomb code. 16 bits at most.
*/
static
inline
void
set_se_golomb
(
PutBitContext
*
pb
,
int
i
){
// if (i>32767 || i<-32767)
// av_log(NULL,AV_LOG_ERROR,"value out of range %d\n", i);
#if 0
if(i<=0) i= -2*i;
else i= 2*i-1;
...
...
libavcodec/h264_cabac.c
View file @
6f6b0311
...
...
@@ -1815,7 +1815,6 @@ static av_always_inline void decode_cabac_luma_residual( H264Context *h, const u
MpegEncContext
*
const
s
=
&
h
->
s
;
int
qscale
=
p
==
0
?
s
->
qscale
:
h
->
chroma_qp
[
p
-
1
];
if
(
IS_INTRA16x16
(
mb_type
)
)
{
//av_log( s->avctx, AV_LOG_ERROR, "INTRA16x16 DC\n" );
AV_ZERO128
(
h
->
mb_luma_dc
[
p
]
+
0
);
AV_ZERO128
(
h
->
mb_luma_dc
[
p
]
+
8
);
AV_ZERO128
(
h
->
mb_luma_dc
[
p
]
+
16
);
...
...
@@ -1826,7 +1825,6 @@ static av_always_inline void decode_cabac_luma_residual( H264Context *h, const u
qmul
=
h
->
dequant4_coeff
[
p
][
qscale
];
for
(
i4x4
=
0
;
i4x4
<
16
;
i4x4
++
)
{
const
int
index
=
16
*
p
+
i4x4
;
//av_log( s->avctx, AV_LOG_ERROR, "INTRA16x16 AC:%d\n", index );
decode_cabac_residual_nondc
(
h
,
h
->
mb
+
(
16
*
index
<<
pixel_shift
),
ctx_cat
[
1
][
p
],
index
,
scan
+
1
,
qmul
,
15
);
}
}
else
{
...
...
@@ -1844,7 +1842,6 @@ static av_always_inline void decode_cabac_luma_residual( H264Context *h, const u
qmul
=
h
->
dequant4_coeff
[
cqm
][
qscale
];
for
(
i4x4
=
0
;
i4x4
<
4
;
i4x4
++
)
{
const
int
index
=
16
*
p
+
4
*
i8x8
+
i4x4
;
//av_log( s->avctx, AV_LOG_ERROR, "Luma4x4: %d\n", index );
//START_TIMER
decode_cabac_residual_nondc
(
h
,
h
->
mb
+
(
16
*
index
<<
pixel_shift
),
ctx_cat
[
2
][
p
],
index
,
scan
,
qmul
,
16
);
//STOP_TIMER("decode_residual")
...
...
@@ -2351,12 +2348,10 @@ decode_intra_mb:
}
else
if
(
CHROMA422
)
{
if
(
cbp
&
0x30
){
int
c
;
for
(
c
=
0
;
c
<
2
;
c
++
)
{
//av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-DC\n",c );
for
(
c
=
0
;
c
<
2
;
c
++
)
decode_cabac_residual_dc_422
(
h
,
h
->
mb
+
((
256
+
16
*
16
*
c
)
<<
pixel_shift
),
3
,
CHROMA_DC_BLOCK_INDEX
+
c
,
chroma422_dc_scan
,
8
);
}
}
if
(
cbp
&
0x20
)
{
...
...
@@ -2367,7 +2362,6 @@ decode_intra_mb:
for
(
i8x8
=
0
;
i8x8
<
2
;
i8x8
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
const
int
index
=
16
+
16
*
c
+
8
*
i8x8
+
i
;
//av_log(s->avctx, AV_LOG_ERROR, "INTRA C%d-AC %d\n",c, index - 16);
decode_cabac_residual_nondc
(
h
,
mb
,
4
,
index
,
scan
+
1
,
qmul
,
15
);
mb
+=
16
<<
pixel_shift
;
}
...
...
@@ -2380,10 +2374,8 @@ decode_intra_mb:
}
else
/* yuv420 */
{
if
(
cbp
&
0x30
){
int
c
;
for
(
c
=
0
;
c
<
2
;
c
++
)
{
//av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-DC\n",c );
for
(
c
=
0
;
c
<
2
;
c
++
)
decode_cabac_residual_dc
(
h
,
h
->
mb
+
((
256
+
16
*
16
*
c
)
<<
pixel_shift
),
3
,
CHROMA_DC_BLOCK_INDEX
+
c
,
chroma_dc_scan
,
4
);
}
}
if
(
cbp
&
0x20
)
{
...
...
@@ -2392,7 +2384,6 @@ decode_intra_mb:
qmul
=
h
->
dequant4_coeff
[
c
+
1
+
(
IS_INTRA
(
mb_type
)
?
0
:
3
)][
h
->
chroma_qp
[
c
]];
for
(
i
=
0
;
i
<
4
;
i
++
)
{
const
int
index
=
16
+
16
*
c
+
i
;
//av_log( s->avctx, AV_LOG_ERROR, "INTRA C%d-AC %d\n",c, index - 16 );
decode_cabac_residual_nondc
(
h
,
h
->
mb
+
(
16
*
index
<<
pixel_shift
),
4
,
index
,
scan
+
1
,
qmul
,
15
);
}
}
...
...
libavcodec/imc.c
View file @
6f6b0311
...
...
@@ -781,8 +781,6 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch)
return
AVERROR_PATCHWELCOME
;
}
// av_log(avctx, AV_LOG_DEBUG, "stream_format_code = %d\n", stream_format_code);
if
(
stream_format_code
&
0x04
)
chctx
->
decoder_reset
=
1
;
...
...
libavcodec/mpegaudiodec.c
View file @
6f6b0311
...
...
@@ -885,9 +885,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
int
pos
=
get_bits_count
(
&
s
->
gb
);
if
(
pos
>=
end_pos
){
// av_log(NULL, AV_LOG_ERROR, "pos: %d %d %d %d\n", pos, end_pos, end_pos2, s_index);
switch_buffer
(
s
,
&
pos
,
&
end_pos
,
&
end_pos2
);
// av_log(NULL, AV_LOG_ERROR, "new pos: %d %d\n", pos, end_pos);
if
(
pos
>=
end_pos
)
break
;
}
...
...
@@ -961,9 +959,7 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
s_index
=
0
;
break
;
}
// av_log(NULL, AV_LOG_ERROR, "pos2: %d %d %d %d\n", pos, end_pos, end_pos2, s_index);
switch_buffer
(
s
,
&
pos
,
&
end_pos
,
&
end_pos2
);
// av_log(NULL, AV_LOG_ERROR, "new pos2: %d %d %d\n", pos, end_pos, s_index);
if
(
pos
>=
end_pos
)
break
;
}
...
...
@@ -986,7 +982,6 @@ static int huffman_decode(MPADecodeContext *s, GranuleDef *g,
}
/* skip extension bits */
bits_left
=
end_pos2
-
get_bits_count
(
&
s
->
gb
);
//av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer);
if
(
bits_left
<
0
&&
(
s
->
err_recognition
&
AV_EF_BUFFER
))
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"bits_left=%d
\n
"
,
bits_left
);
s_index
=
0
;
...
...
libavcodec/mpegvideo.c
View file @
6f6b0311
...
...
@@ -1758,7 +1758,6 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
else
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
" "
);
}
// av_log(s->avctx, AV_LOG_DEBUG, " ");
}
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"
\n
"
);
}
...
...
libavcodec/mpegvideo_enc.c
View file @
6f6b0311
...
...
@@ -1233,10 +1233,6 @@ static int select_input_picture(MpegEncContext *s)
if
(
s
->
picture_in_gop_number
<
s
->
gop_size
&&
skip_check
(
s
,
s
->
input_picture
[
0
],
s
->
next_picture_ptr
))
{
// FIXME check that te gop check above is +-1 correct
//av_log(NULL, AV_LOG_DEBUG, "skip %p %"PRId64"\n",
// s->input_picture[0]->f.data[0],
// s->input_picture[0]->pts);
if
(
s
->
input_picture
[
0
]
->
f
.
type
==
FF_BUFFER_TYPE_SHARED
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
s
->
input_picture
[
0
]
->
f
.
data
[
i
]
=
NULL
;
...
...
@@ -1308,9 +1304,6 @@ static int select_input_picture(MpegEncContext *s)
}
emms_c
();
//static int b_count = 0;
//b_count += b_frames;
//av_log(s->avctx, AV_LOG_DEBUG, "b_frames: %d\n", b_count);
for
(
i
=
b_frames
-
1
;
i
>=
0
;
i
--
)
{
int
type
=
s
->
input_picture
[
i
]
->
f
.
pict_type
;
...
...
@@ -1501,7 +1494,6 @@ vbv_retry:
s
->
time_base
=
s
->
last_time_base
;
s
->
last_non_b_time
=
s
->
time
-
s
->
pp_time
;
}
//av_log(NULL, AV_LOG_ERROR, "R:%d ", s->next_lambda);
for
(
i
=
0
;
i
<
context_count
;
i
++
)
{
PutBitContext
*
pb
=
&
s
->
thread_context
[
i
]
->
pb
;
init_put_bits
(
pb
,
pb
->
buf
,
pb
->
buf_end
-
pb
->
buf
);
...
...
libavcodec/parser.c
View file @
6f6b0311
...
...
@@ -152,7 +152,6 @@ int av_parser_parse2(AVCodecParserContext *s,
/* WARNING: the returned index can be negative */
index
=
s
->
parser
->
parser_parse
(
s
,
avctx
,
(
const
uint8_t
**
)
poutbuf
,
poutbuf_size
,
buf
,
buf_size
);
//av_log(NULL, AV_LOG_DEBUG, "parser: in:%"PRId64", %"PRId64", out:%"PRId64", %"PRId64", in:%d out:%d id:%d\n", pts, dts, s->last_pts, s->last_dts, buf_size, *poutbuf_size, avctx->codec_id);
/* update the file pointer */
if
(
*
poutbuf_size
)
{
/* fill the data for the current frame */
...
...
libavcodec/rv10.c
View file @
6f6b0311
...
...
@@ -373,7 +373,6 @@ static int rv20_decode_picture_header(RVDecContext *rv)
mb_pos
=
ff_h263_decode_mba
(
s
);
//av_log(s->avctx, AV_LOG_DEBUG, "%d\n", seq);
seq
|=
s
->
time
&~
0x7FFF
;
if
(
seq
-
s
->
time
>
0x4000
)
seq
-=
0x8000
;
if
(
seq
-
s
->
time
<
-
0x4000
)
seq
+=
0x8000
;
...
...
@@ -392,11 +391,7 @@ static int rv20_decode_picture_header(RVDecContext *rv)
ff_mpeg4_init_direct_mv
(
s
);
}
}
// printf("%d %d %d %d %d\n", seq, (int)s->time, (int)s->last_non_b_time, s->pp_time, s->pb_time);
/*for(i=0; i<32; i++){
av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
}
av_log(s->avctx, AV_LOG_DEBUG, "\n");*/
s
->
no_rounding
=
get_bits1
(
&
s
->
gb
);
if
(
RV_GET_MINOR_VER
(
rv
->
sub_id
)
<=
1
&&
s
->
pict_type
==
AV_PICTURE_TYPE_B
)
...
...
libavcodec/vc1.c
View file @
6f6b0311
...
...
@@ -394,8 +394,6 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
v
->
res_rtm_flag
=
get_bits1
(
gb
);
//reserved
}
if
(
!
v
->
res_rtm_flag
)
{
// av_log(avctx, AV_LOG_ERROR,
// "0 for reserved RES_RTM_FLAG is forbidden\n");
av_log
(
avctx
,
AV_LOG_ERROR
,
"Old WMV3 version detected, some frames may be decoded incorrectly
\n
"
);
//return -1;
...
...
libavcodec/vorbis.c
View file @
6f6b0311
...
...
@@ -62,10 +62,8 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
for
(
p
=
0
;
(
bits
[
p
]
==
0
)
&&
(
p
<
num
);
++
p
)
;
if
(
p
==
num
)
{
// av_log(vc->avccontext, AV_LOG_INFO, "An empty codebook. Heh?! \n");
if
(
p
==
num
)
return
0
;
}
codes
[
p
]
=
0
;
if
(
bits
[
p
]
>
32
)
...
...
libavcodec/wmadec.c
View file @
6f6b0311
...
...
@@ -95,8 +95,6 @@ static int wma_decode_init(AVCodecContext * avctx)
}
else
if
(
avctx
->
codec
->
id
==
AV_CODEC_ID_WMAV2
&&
avctx
->
extradata_size
>=
6
)
{
flags2
=
AV_RL16
(
extradata
+
4
);
}
// for(i=0; i<avctx->extradata_size; i++)
// av_log(NULL, AV_LOG_ERROR, "%02X ", extradata[i]);
s
->
use_exp_vlc
=
flags2
&
0x0001
;
s
->
use_bit_reservoir
=
flags2
&
0x0002
;
...
...
libavcodec/wmaenc.c
View file @
6f6b0311
...
...
@@ -86,7 +86,6 @@ static int encode_init(AVCodecContext * avctx){
avctx
->
block_align
=
s
->
block_align
;
avctx
->
bit_rate
=
avctx
->
block_align
*
8LL
*
avctx
->
sample_rate
/
s
->
frame_len
;
//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", s->block_align, avctx->bit_rate, s->frame_len, avctx->sample_rate);
avctx
->
frame_size
=
avctx
->
delay
=
s
->
frame_len
;
#if FF_API_OLD_ENCODE_AUDIO
...
...
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