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
52567e81
Commit
52567e81
authored
May 21, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_bits: Drop some TRACE-level debug code
It will not be provided by the new bit reader anyway.
parent
e45a638f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
74 deletions
+0
-74
get_bits.h
libavcodec/get_bits.h
+0
-64
golomb.h
libavcodec/golomb.h
+0
-6
h264_cavlc.c
libavcodec/h264_cavlc.c
+0
-4
No files found.
libavcodec/get_bits.h
View file @
52567e81
...
@@ -528,68 +528,4 @@ static inline int get_bits_left(GetBitContext *gb)
...
@@ -528,68 +528,4 @@ static inline int get_bits_left(GetBitContext *gb)
return
gb
->
size_in_bits
-
get_bits_count
(
gb
);
return
gb
->
size_in_bits
-
get_bits_count
(
gb
);
}
}
//#define TRACE
#ifdef TRACE
static
inline
void
print_bin
(
int
bits
,
int
n
)
{
int
i
;
for
(
i
=
n
-
1
;
i
>=
0
;
i
--
)
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%d"
,
(
bits
>>
i
)
&
1
);
for
(
i
=
n
;
i
<
24
;
i
++
)
av_log
(
NULL
,
AV_LOG_DEBUG
,
" "
);
}
static
inline
int
get_bits_trace
(
GetBitContext
*
s
,
int
n
,
const
char
*
file
,
const
char
*
func
,
int
line
)
{
int
r
=
get_bits
(
s
,
n
);
print_bin
(
r
,
n
);
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d bit @%5d in %s %s:%d
\n
"
,
r
,
n
,
r
,
get_bits_count
(
s
)
-
n
,
file
,
func
,
line
);
return
r
;
}
static
inline
int
get_vlc_trace
(
GetBitContext
*
s
,
VLC_TYPE
(
*
table
)[
2
],
int
bits
,
int
max_depth
,
const
char
*
file
,
const
char
*
func
,
int
line
)
{
int
show
=
show_bits
(
s
,
24
);
int
pos
=
get_bits_count
(
s
);
int
r
=
get_vlc2
(
s
,
table
,
bits
,
max_depth
);
int
len
=
get_bits_count
(
s
)
-
pos
;
int
bits2
=
show
>>
(
24
-
len
);
print_bin
(
bits2
,
len
);
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d vlc @%5d in %s %s:%d
\n
"
,
bits2
,
len
,
r
,
pos
,
file
,
func
,
line
);
return
r
;
}
static
inline
int
get_xbits_trace
(
GetBitContext
*
s
,
int
n
,
const
char
*
file
,
const
char
*
func
,
int
line
)
{
int
show
=
show_bits
(
s
,
n
);
int
r
=
get_xbits
(
s
,
n
);
print_bin
(
show
,
n
);
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d xbt @%5d in %s %s:%d
\n
"
,
show
,
n
,
r
,
get_bits_count
(
s
)
-
n
,
file
,
func
,
line
);
return
r
;
}
#define get_bits(s, n) get_bits_trace(s , n, __FILE__, __PRETTY_FUNCTION__, __LINE__)
#define get_bits1(s) get_bits_trace(s, 1, __FILE__, __PRETTY_FUNCTION__, __LINE__)
#define get_xbits(s, n) get_xbits_trace(s, n, __FILE__, __PRETTY_FUNCTION__, __LINE__)
#define get_vlc(s, vlc) get_vlc_trace(s, (vlc)->table, (vlc)->bits, 3, __FILE__, __PRETTY_FUNCTION__, __LINE__)
#define get_vlc2(s, tab, bits, max) get_vlc_trace(s, tab, bits, max, __FILE__, __PRETTY_FUNCTION__, __LINE__)
#endif
#endif
/* AVCODEC_GET_BITS_H */
#endif
/* AVCODEC_GET_BITS_H */
libavcodec/golomb.h
View file @
52567e81
...
@@ -413,8 +413,6 @@ static inline int get_ue(GetBitContext *s, const char *file, const char *func,
...
@@ -413,8 +413,6 @@ static inline int get_ue(GetBitContext *s, const char *file, const char *func,
int
len
=
get_bits_count
(
s
)
-
pos
;
int
len
=
get_bits_count
(
s
)
-
pos
;
int
bits
=
show
>>
(
24
-
len
);
int
bits
=
show
>>
(
24
-
len
);
print_bin
(
bits
,
len
);
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d ue @%5d in %s %s:%d
\n
"
,
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d ue @%5d in %s %s:%d
\n
"
,
bits
,
len
,
i
,
pos
,
file
,
func
,
line
);
bits
,
len
,
i
,
pos
,
file
,
func
,
line
);
...
@@ -430,8 +428,6 @@ static inline int get_se(GetBitContext *s, const char *file, const char *func,
...
@@ -430,8 +428,6 @@ static inline int get_se(GetBitContext *s, const char *file, const char *func,
int
len
=
get_bits_count
(
s
)
-
pos
;
int
len
=
get_bits_count
(
s
)
-
pos
;
int
bits
=
show
>>
(
24
-
len
);
int
bits
=
show
>>
(
24
-
len
);
print_bin
(
bits
,
len
);
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d se @%5d in %s %s:%d
\n
"
,
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d se @%5d in %s %s:%d
\n
"
,
bits
,
len
,
i
,
pos
,
file
,
func
,
line
);
bits
,
len
,
i
,
pos
,
file
,
func
,
line
);
...
@@ -447,8 +443,6 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
...
@@ -447,8 +443,6 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
int
len
=
get_bits_count
(
s
)
-
pos
;
int
len
=
get_bits_count
(
s
)
-
pos
;
int
bits
=
show
>>
(
24
-
len
);
int
bits
=
show
>>
(
24
-
len
);
print_bin
(
bits
,
len
);
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d te @%5d in %s %s:%d
\n
"
,
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d te @%5d in %s %s:%d
\n
"
,
bits
,
len
,
i
,
pos
,
file
,
func
,
line
);
bits
,
len
,
i
,
pos
,
file
,
func
,
line
);
...
...
libavcodec/h264_cavlc.c
View file @
52567e81
...
@@ -421,10 +421,6 @@ static inline int get_level_prefix(GetBitContext *gb){
...
@@ -421,10 +421,6 @@ static inline int get_level_prefix(GetBitContext *gb){
buf
=
GET_CACHE
(
re
,
gb
);
buf
=
GET_CACHE
(
re
,
gb
);
log
=
32
-
av_log2
(
buf
);
log
=
32
-
av_log2
(
buf
);
#ifdef TRACE
print_bin
(
buf
>>
(
32
-
log
),
log
);
av_log
(
NULL
,
AV_LOG_DEBUG
,
"%5d %2d %3d lpr @%5d in %s get_level_prefix
\n
"
,
buf
>>
(
32
-
log
),
log
,
log
-
1
,
get_bits_count
(
gb
),
__FILE__
);
#endif
LAST_SKIP_BITS
(
re
,
gb
,
log
);
LAST_SKIP_BITS
(
re
,
gb
,
log
);
CLOSE_READER
(
re
,
gb
);
CLOSE_READER
(
re
,
gb
);
...
...
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