Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b691d5d7
Commit
b691d5d7
authored
Nov 21, 2007
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/codec/x264.c: Fixed DTS when adaptive B frames are used (still
wrong for bpyramid, though).
parent
d4bbae04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
modules/codec/x264.c
modules/codec/x264.c
+12
-6
No files found.
modules/codec/x264.c
View file @
b691d5d7
...
...
@@ -669,7 +669,7 @@ struct encoder_sys_t
int
i_buffer
;
uint8_t
*
p_buffer
;
mtime_t
i_
last_ref_p
ts
;
mtime_t
i_
interpolated_d
ts
;
char
*
psz_stat_name
;
};
...
...
@@ -720,7 +720,7 @@ static int Open ( vlc_object_t *p_this )
p_enc
->
pf_encode_video
=
Encode
;
p_enc
->
pf_encode_audio
=
NULL
;
p_enc
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
encoder_sys_t
)
);
p_sys
->
i_
last_ref_p
ts
=
0
;
p_sys
->
i_
interpolated_d
ts
=
0
;
p_sys
->
psz_stat_name
=
NULL
;
x264_param_default
(
&
p_sys
->
param
);
...
...
@@ -1239,19 +1239,21 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
p_enc
->
fmt_in
.
video
.
i_frame_rate_base
/
p_enc
->
fmt_in
.
video
.
i_frame_rate
;
p_block
->
i_
dts
=
p_block
->
i_
pts
=
pic
.
i_pts
;
p_block
->
i_pts
=
pic
.
i_pts
;
if
(
p_sys
->
param
.
i_bframe
>
0
)
{
if
(
p_block
->
i_flags
&
BLOCK_FLAG_TYPE_B
)
{
/* FIXME : this is wrong if bpyramid is set */
p_block
->
i_dts
=
p_block
->
i_pts
;
p_sys
->
i_interpolated_dts
=
p_block
->
i_dts
;
}
else
{
if
(
p_sys
->
i_
last_ref_p
ts
)
if
(
p_sys
->
i_
interpolated_d
ts
)
{
p_block
->
i_dts
=
p_sys
->
i_
last_ref_p
ts
;
p_block
->
i_dts
=
p_sys
->
i_
interpolated_d
ts
;
}
else
{
...
...
@@ -1259,9 +1261,13 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
p_block
->
i_dts
=
p_block
->
i_pts
;
}
p_sys
->
i_
last_ref_pts
=
p_block
->
i_pts
;
p_sys
->
i_
interpolated_dts
+=
p_block
->
i_length
;
}
}
else
{
p_block
->
i_dts
=
p_block
->
i_pts
;
}
return
p_block
;
}
...
...
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