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
5bebb6e6
Commit
5bebb6e6
authored
Oct 06, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg1dec: More complete sofdec support
Fixes Ticket517 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1b3b4a57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
mpeg12.c
libavcodec/mpeg12.c
+19
-0
No files found.
libavcodec/mpeg12.c
View file @
5bebb6e6
...
...
@@ -1128,6 +1128,7 @@ typedef struct Mpeg1Context {
int
save_width
,
save_height
,
save_progressive_seq
;
AVRational
frame_rate_ext
;
///< MPEG-2 specific framerate modificator
int
sync
;
///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
int
tmpgexs
;
}
Mpeg1Context
;
static
av_cold
int
mpeg_decode_init
(
AVCodecContext
*
avctx
)
...
...
@@ -2122,8 +2123,22 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
static
void
mpeg_decode_user_data
(
AVCodecContext
*
avctx
,
const
uint8_t
*
p
,
int
buf_size
)
{
Mpeg1Context
*
s
=
avctx
->
priv_data
;
const
uint8_t
*
buf_end
=
p
+
buf_size
;
if
(
buf_size
>
29
){
int
i
;
for
(
i
=
0
;
i
<
20
;
i
++
)
if
(
!
memcmp
(
p
+
i
,
"
\0
TMPGEXS
\0
"
,
9
)){
s
->
tmpgexs
=
1
;
}
/* for(i=0; !(!p[i-2] && !p[i-1] && p[i]==1) && i<buf_size; i++){
av_log(0,0, "%c", p[i]);
}
av_log(0,0, "\n");*/
}
/* we parse the DTG active format information */
if
(
buf_end
-
p
>=
5
&&
p
[
0
]
==
'D'
&&
p
[
1
]
==
'T'
&&
p
[
2
]
==
'G'
&&
p
[
3
]
==
'1'
)
{
...
...
@@ -2341,6 +2356,10 @@ static int decode_chunks(AVCodecContext *avctx,
break
;
case
PICTURE_START_CODE
:
if
(
s
->
tmpgexs
){
s2
->
intra_dc_precision
=
3
;
s2
->
intra_matrix
[
0
]
=
1
;
}
if
(
HAVE_THREADS
&&
(
avctx
->
active_thread_type
&
FF_THREAD_SLICE
)
&&
s
->
slice_count
)
{
int
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