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
2abf305a
Commit
2abf305a
authored
Oct 14, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x265: initialize picture and set picture type
parent
229e2709
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
modules/codec/x265.c
modules/codec/x265.c
+15
-0
No files found.
modules/codec/x265.c
View file @
2abf305a
...
...
@@ -70,6 +70,8 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
encoder_sys_t
*
p_sys
=
p_enc
->
p_sys
;
x265_picture_t
pic
;
x265_picture_init
(
&
p_sys
->
param
,
&
pic
);
if
(
likely
(
p_pict
))
{
if
(
unlikely
(
p_sys
->
initial_date
==
0
))
{
p_sys
->
initial_date
=
p_pict
->
date
;
...
...
@@ -120,6 +122,19 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
p_block
->
i_pts
=
p_sys
->
initial_date
+
pic
.
poc
*
p_block
->
i_length
;
p_block
->
i_dts
=
p_sys
->
initial_date
+
p_sys
->
dts
++
*
p_block
->
i_length
;
switch
(
pic
.
sliceType
)
{
case
X265_TYPE_I
:
p_block
->
i_flags
|=
BLOCK_FLAG_TYPE_I
;
break
;
case
X265_TYPE_P
:
p_block
->
i_flags
|=
BLOCK_FLAG_TYPE_P
;
break
;
case
X265_TYPE_B
:
p_block
->
i_flags
|=
BLOCK_FLAG_TYPE_B
;
break
;
}
#ifndef NDEBUG
msg_Dbg
(
p_enc
,
"%zu bytes (frame %"
PRId64
", %.2ffps)"
,
p_block
->
i_buffer
,
p_sys
->
dts
,
(
float
)
p_sys
->
dts
*
CLOCK_FREQ
/
(
mdate
()
-
p_sys
->
start
));
...
...
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