Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
baced9d2
Commit
baced9d2
authored
Dec 20, 2009
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x264: avoid one memcpy
parent
70439ea3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
modules/codec/x264.c
modules/codec/x264.c
+9
-4
No files found.
modules/codec/x264.c
View file @
baced9d2
...
...
@@ -1216,15 +1216,20 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
if
(
!
i_nal
)
return
NULL
;
/* Get size of block we need */
for
(
i
=
0
,
i_out
=
0
;
i
<
i_nal
;
i
++
)
{
memcpy
(
p_sys
->
p_buffer
+
i_out
,
nal
[
i
].
p_payload
,
nal
[
i
].
i_payload
);
i_out
+=
nal
[
i
].
i_payload
;
}
p_block
=
block_New
(
p_enc
,
i_out
);
if
(
!
p_block
)
return
NULL
;
memcpy
(
p_block
->
p_buffer
,
p_sys
->
p_buffer
,
i_out
);
/* copy encoded data directly to block, instead taking via p_sys->p_buffer */
for
(
i
=
0
,
i_out
=
0
;
i
<
i_nal
;
i
++
)
{
memcpy
(
p_block
->
p_buffer
+
i_out
,
nal
[
i
].
p_payload
,
nal
[
i
].
i_payload
);
i_out
+=
nal
[
i
].
i_payload
;
}
if
(
pic
.
i_type
==
X264_TYPE_IDR
||
pic
.
i_type
==
X264_TYPE_I
)
p_block
->
i_flags
|=
BLOCK_FLAG_TYPE_I
;
...
...
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