Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3a057670
Commit
3a057670
authored
Feb 12, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: store current_sps_id inside the current sps
In preparation for MVC support.
parent
73e8fab3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
h264.c
libavcodec/h264.c
+2
-3
h264.h
libavcodec/h264.h
+1
-1
h264_ps.c
libavcodec/h264_ps.c
+1
-1
No files found.
libavcodec/h264.c
View file @
3a057670
...
...
@@ -3414,12 +3414,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
return
AVERROR_INVALIDDATA
;
}
if
(
h
->
pps
.
sps_id
!=
h
->
current_
sps_id
||
if
(
h
->
pps
.
sps_id
!=
h
->
sps
.
sps_id
||
h0
->
sps_buffers
[
h
->
pps
.
sps_id
]
->
new
)
{
h0
->
sps_buffers
[
h
->
pps
.
sps_id
]
->
new
=
0
;
h
->
current_sps_id
=
h
->
pps
.
sps_id
;
h
->
sps
=
*
h0
->
sps_buffers
[
h
->
pps
.
sps_id
];
h
->
sps
=
*
h0
->
sps_buffers
[
h
->
pps
.
sps_id
];
if
(
h
->
bit_depth_luma
!=
h
->
sps
.
bit_depth_luma
||
h
->
chroma_format_idc
!=
h
->
sps
.
chroma_format_idc
)
{
...
...
libavcodec/h264.h
View file @
3a057670
...
...
@@ -146,6 +146,7 @@ typedef enum {
* Sequence parameter set
*/
typedef
struct
SPS
{
unsigned
int
sps_id
;
int
profile_idc
;
int
level_idc
;
int
chroma_format_idc
;
...
...
@@ -353,7 +354,6 @@ typedef struct H264Context {
ptrdiff_t
mb_linesize
;
///< may be equal to s->linesize or s->linesize * 2, for mbaff
ptrdiff_t
mb_uvlinesize
;
unsigned
current_sps_id
;
///< id of the current SPS
SPS
sps
;
///< current sps
/**
...
...
libavcodec/h264_ps.c
View file @
3a057670
...
...
@@ -318,6 +318,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
if
(
!
sps
)
return
AVERROR
(
ENOMEM
);
sps
->
sps_id
=
sps_id
;
sps
->
time_offset_length
=
24
;
sps
->
profile_idc
=
profile_idc
;
sps
->
constraint_set_flags
=
constraint_set_flags
;
...
...
@@ -504,7 +505,6 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
av_free
(
h
->
sps_buffers
[
sps_id
]);
h
->
sps_buffers
[
sps_id
]
=
sps
;
h
->
sps
=
*
sps
;
h
->
current_sps_id
=
sps_id
;
return
0
;
...
...
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