Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
b574e1e9
Commit
b574e1e9
authored
10 years ago
by
Diego Biurrun
Browse files
Options
Downloads
Patches
Plain Diff
get_bits: Add OPEN_READER macro variant w/o size_plus8
This avoids a trillion warnings from MSVC.
parent
b21e989a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/dvdec.c
+1
-1
1 addition, 1 deletion
libavcodec/dvdec.c
libavcodec/get_bits.h
+7
-6
7 additions, 6 deletions
libavcodec/get_bits.h
with
8 additions
and
7 deletions
libavcodec/dvdec.c
+
1
−
1
View file @
b574e1e9
...
@@ -88,7 +88,7 @@ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, int16_t *block)
...
@@ -88,7 +88,7 @@ static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, int16_t *block)
int
partial_bit_count
=
mb
->
partial_bit_count
;
int
partial_bit_count
=
mb
->
partial_bit_count
;
int
level
,
run
,
vlc_len
,
index
;
int
level
,
run
,
vlc_len
,
index
;
OPEN_READER
(
re
,
gb
);
OPEN_READER
_NOSIZE
(
re
,
gb
);
UPDATE_CACHE
(
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 */
...
...
This diff is collapsed.
Click to expand it.
libavcodec/get_bits.h
+
7
−
6
View file @
b574e1e9
...
@@ -123,17 +123,18 @@ typedef struct RL_VLC_ELEM {
...
@@ -123,17 +123,18 @@ typedef struct RL_VLC_ELEM {
# define MIN_CACHE_BITS 25
# define MIN_CACHE_BITS 25
#endif
#endif
#if UNCHECKED_BITSTREAM_READER
#define OPEN_READER_NOSIZE(name, gb) \
#define OPEN_READER(name, gb) \
unsigned int name ## _index = (gb)->index; \
unsigned int name ## _index = (gb)->index; \
unsigned int av_unused name ## _cache = 0
unsigned int av_unused name ## _cache = 0
#if UNCHECKED_BITSTREAM_READER
#define OPEN_READER(name, gb) OPEN_READER_NOSIZE(name, gb)
#define BITS_AVAILABLE(name, gb) 1
#define BITS_AVAILABLE(name, gb) 1
#else
#else
#define OPEN_READER(name, gb) \
#define OPEN_READER(name, gb) \
unsigned int name ## _index = (gb)->index; \
OPEN_READER_NOSIZE(name, gb); \
unsigned int av_unused name ## _cache = 0; \
unsigned int name ## _size_plus8 = (gb)->size_in_bits_plus8
unsigned int av_unused name ## _size_plus8 = (gb)->size_in_bits_plus8
#define BITS_AVAILABLE(name, gb) name ## _index < name ## _size_plus8
#define BITS_AVAILABLE(name, gb) name ## _index < name ## _size_plus8
#endif
#endif
...
@@ -254,7 +255,7 @@ static inline unsigned int get_bits(GetBitContext *s, int n)
...
@@ -254,7 +255,7 @@ static inline unsigned int get_bits(GetBitContext *s, int n)
static
inline
unsigned
int
show_bits
(
GetBitContext
*
s
,
int
n
)
static
inline
unsigned
int
show_bits
(
GetBitContext
*
s
,
int
n
)
{
{
register
int
tmp
;
register
int
tmp
;
OPEN_READER
(
re
,
s
);
OPEN_READER
_NOSIZE
(
re
,
s
);
UPDATE_CACHE
(
re
,
s
);
UPDATE_CACHE
(
re
,
s
);
tmp
=
SHOW_UBITS
(
re
,
s
,
n
);
tmp
=
SHOW_UBITS
(
re
,
s
,
n
);
return
tmp
;
return
tmp
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment