Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
ad3713cb
Commit
ad3713cb
authored
May 05, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* bits.h: clean up
parent
8d98b9f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
modules/mux/mpeg/bits.h
modules/mux/mpeg/bits.h
+10
-13
No files found.
modules/mux/mpeg/bits.h
View file @
ad3713cb
...
...
@@ -2,7 +2,7 @@
* bits.h
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: bits.h,v 1.
3 2003/01/08 10:34:58
fenrir Exp $
* $Id: bits.h,v 1.
4 2003/05/05 15:52:13
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -31,8 +31,8 @@ typedef struct bits_buffer_s
uint8_t
*
p_data
;
}
bits_buffer_t
;
static
inline
int
bits_initwrite
(
bits_buffer_t
*
p_buffer
,
static
inline
int
bits_initwrite
(
bits_buffer_t
*
p_buffer
,
int
i_size
,
void
*
p_data
)
{
p_buffer
->
i_size
=
i_size
;
...
...
@@ -41,9 +41,9 @@ static inline int bits_initwrite( bits_buffer_t *p_buffer,
p_buffer
->
p_data
=
p_data
;
p_buffer
->
p_data
[
0
]
=
0
;
if
(
!
p_buffer
->
p_data
)
{
{
if
(
!
(
p_buffer
->
p_data
=
malloc
(
i_size
)
)
)
{
{
return
(
-
1
);
}
else
...
...
@@ -67,12 +67,14 @@ static inline void bits_align( bits_buffer_t *p_buffer )
}
}
static
inline
void
bits_write
(
bits_buffer_t
*
p_buffer
,
static
inline
void
bits_write
(
bits_buffer_t
*
p_buffer
,
int
i_count
,
uint64_t
i_bits
)
{
while
(
i_count
>
0
)
{
if
(
(
i_bits
>>
(
i_count
-
1
)
)
&
0x01
)
i_count
--
;
if
(
(
i_bits
>>
i_count
)
&
0x01
)
{
p_buffer
->
p_data
[
p_buffer
->
i_data
]
|=
p_buffer
->
i_mask
;
}
...
...
@@ -84,13 +86,8 @@ static inline void bits_write( bits_buffer_t *p_buffer,
if
(
p_buffer
->
i_mask
==
0
)
{
p_buffer
->
i_data
++
;
if
(
p_buffer
->
i_data
<
p_buffer
->
i_size
)
{
// p_buffer->p_data[p_buffer->i_data] = 0;
p_buffer
->
i_mask
=
0x80
;
}
p_buffer
->
i_mask
=
0x80
;
}
i_count
--
;
}
}
...
...
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