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
a8380f44
Commit
a8380f44
authored
21 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
removing unused var & converting 64->32bit
Originally committed as revision 2567 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
2be9f03a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
libavcodec/common.c
+3
-4
3 additions, 4 deletions
libavcodec/common.c
libavcodec/common.h
+1
-2
1 addition, 2 deletions
libavcodec/common.h
libavcodec/dv.c
+1
-1
1 addition, 1 deletion
libavcodec/dv.c
libavformat/gif.c
+0
-1
0 additions, 1 deletion
libavformat/gif.c
with
5 additions
and
8 deletions
libavcodec/common.c
+
3
−
4
View file @
a8380f44
...
@@ -48,7 +48,6 @@ void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
...
@@ -48,7 +48,6 @@ void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
{
{
s
->
buf
=
buffer
;
s
->
buf
=
buffer
;
s
->
buf_end
=
s
->
buf
+
buffer_size
;
s
->
buf_end
=
s
->
buf
+
buffer_size
;
s
->
data_out_size
=
0
;
#ifdef ALT_BITSTREAM_WRITER
#ifdef ALT_BITSTREAM_WRITER
s
->
index
=
0
;
s
->
index
=
0
;
((
uint32_t
*
)(
s
->
buf
))[
0
]
=
0
;
((
uint32_t
*
)(
s
->
buf
))[
0
]
=
0
;
...
@@ -63,12 +62,12 @@ void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
...
@@ -63,12 +62,12 @@ void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
#ifdef CONFIG_ENCODERS
#ifdef CONFIG_ENCODERS
/* return the number of bits output */
/* return the number of bits output */
int
64_t
get_bit_count
(
PutBitContext
*
s
)
int
get_bit_count
(
PutBitContext
*
s
)
{
{
#ifdef ALT_BITSTREAM_WRITER
#ifdef ALT_BITSTREAM_WRITER
return
s
->
data_out_size
*
8
+
s
->
index
;
return
s
->
index
;
#else
#else
return
(
s
->
buf_ptr
-
s
->
buf
+
s
->
data_out_size
)
*
8
+
32
-
(
int64_t
)
s
->
bit_left
;
return
(
s
->
buf_ptr
-
s
->
buf
)
*
8
+
32
-
s
->
bit_left
;
#endif
#endif
}
}
...
...
This diff is collapsed.
Click to expand it.
libavcodec/common.h
+
1
−
2
View file @
a8380f44
...
@@ -274,12 +274,11 @@ typedef struct PutBitContext {
...
@@ -274,12 +274,11 @@ typedef struct PutBitContext {
int
bit_left
;
int
bit_left
;
uint8_t
*
buf
,
*
buf_ptr
,
*
buf_end
;
uint8_t
*
buf
,
*
buf_ptr
,
*
buf_end
;
#endif
#endif
int64_t
data_out_size
;
/* in bytes */
}
PutBitContext
;
}
PutBitContext
;
void
init_put_bits
(
PutBitContext
*
s
,
uint8_t
*
buffer
,
int
buffer_size
);
void
init_put_bits
(
PutBitContext
*
s
,
uint8_t
*
buffer
,
int
buffer_size
);
int
64_t
get_bit_count
(
PutBitContext
*
s
);
/* XXX: change function name */
int
get_bit_count
(
PutBitContext
*
s
);
/* XXX: change function name */
void
align_put_bits
(
PutBitContext
*
s
);
void
align_put_bits
(
PutBitContext
*
s
);
void
flush_put_bits
(
PutBitContext
*
s
);
void
flush_put_bits
(
PutBitContext
*
s
);
void
put_string
(
PutBitContext
*
pbc
,
char
*
s
);
void
put_string
(
PutBitContext
*
pbc
,
char
*
s
);
...
...
This diff is collapsed.
Click to expand it.
libavcodec/dv.c
+
1
−
1
View file @
a8380f44
...
@@ -645,7 +645,7 @@ typedef struct EncBlockInfo {
...
@@ -645,7 +645,7 @@ typedef struct EncBlockInfo {
static
always_inline
int
dv_bits_left
(
PutBitContext
*
s
)
static
always_inline
int
dv_bits_left
(
PutBitContext
*
s
)
{
{
return
(
s
->
buf_end
-
s
->
buf
)
*
8
-
return
(
s
->
buf_end
-
s
->
buf
)
*
8
-
((
s
->
buf_ptr
-
s
->
buf
+
s
->
data_out_size
)
*
8
+
32
-
(
int64_t
)
s
->
bit_left
);
((
s
->
buf_ptr
-
s
->
buf
)
*
8
+
32
-
(
int64_t
)
s
->
bit_left
);
}
}
static
always_inline
void
dv_encode_ac
(
EncBlockInfo
*
bi
,
PutBitContext
*
pb_pool
,
static
always_inline
void
dv_encode_ac
(
EncBlockInfo
*
bi
,
PutBitContext
*
pb_pool
,
...
...
This diff is collapsed.
Click to expand it.
libavformat/gif.c
+
0
−
1
View file @
a8380f44
...
@@ -274,7 +274,6 @@ static int gif_image_write_image(ByteIOContext *pb,
...
@@ -274,7 +274,6 @@ static int gif_image_write_image(ByteIOContext *pb,
if
(
pbBufPtr
(
&
p
)
-
p
.
buf
>
0
)
{
if
(
pbBufPtr
(
&
p
)
-
p
.
buf
>
0
)
{
put_byte
(
pb
,
pbBufPtr
(
&
p
)
-
p
.
buf
);
/* byte count of the packet */
put_byte
(
pb
,
pbBufPtr
(
&
p
)
-
p
.
buf
);
/* byte count of the packet */
put_buffer
(
pb
,
p
.
buf
,
pbBufPtr
(
&
p
)
-
p
.
buf
);
/* the actual buffer */
put_buffer
(
pb
,
p
.
buf
,
pbBufPtr
(
&
p
)
-
p
.
buf
);
/* the actual buffer */
p
.
data_out_size
+=
pbBufPtr
(
&
p
)
-
p
.
buf
;
p
.
buf_ptr
=
p
.
buf
;
/* dequeue the bytes off the bitstream */
p
.
buf_ptr
=
p
.
buf
;
/* dequeue the bytes off the bitstream */
}
}
if
(
left
<=
GIF_CHUNKS
)
{
if
(
left
<=
GIF_CHUNKS
)
{
...
...
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