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
e94bc100
Commit
e94bc100
authored
Jul 24, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATI VCR2 decoding support
Originally committed as revision 2079 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
14bc6e63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletion
+50
-1
mpeg12.c
libavcodec/mpeg12.c
+50
-1
No files found.
libavcodec/mpeg12.c
View file @
e94bc100
...
@@ -928,8 +928,10 @@ static int mpeg_decode_mb(MpegEncContext *s,
...
@@ -928,8 +928,10 @@ static int mpeg_decode_mb(MpegEncContext *s,
default:
default:
case
I_TYPE
:
case
I_TYPE
:
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
{
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
{
if
(
get_bits1
(
&
s
->
gb
)
==
0
)
if
(
get_bits1
(
&
s
->
gb
)
==
0
){
fprintf
(
"invalid mb type in I Frame at %d %d
\n
"
,
s
->
mb_x
,
s
->
mb_y
);
return
-
1
;
return
-
1
;
}
mb_type
=
MB_TYPE_QUANT
|
MB_TYPE_INTRA
;
mb_type
=
MB_TYPE_QUANT
|
MB_TYPE_INTRA
;
}
else
{
}
else
{
mb_type
=
MB_TYPE_INTRA
;
mb_type
=
MB_TYPE_INTRA
;
...
@@ -2148,6 +2150,49 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
...
@@ -2148,6 +2150,49 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
return
0
;
return
0
;
}
}
static
int
vcr2_init_sequence
(
AVCodecContext
*
avctx
)
{
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
int
i
,
v
,
j
;
float
aspect
;
/* start new mpeg1 context decoding */
s
->
out_format
=
FMT_MPEG1
;
if
(
s1
->
mpeg_enc_ctx_allocated
)
{
MPV_common_end
(
s
);
}
s
->
width
=
avctx
->
width
;
s
->
height
=
avctx
->
height
;
avctx
->
has_b_frames
=
0
;
//true?
s
->
avctx
=
avctx
;
if
(
MPV_common_init
(
s
)
<
0
)
return
-
1
;
s1
->
mpeg_enc_ctx_allocated
=
1
;
for
(
i
=
0
;
i
<
64
;
i
++
)
{
int
j
=
s
->
dsp
.
idct_permutation
[
i
];
v
=
ff_mpeg1_default_intra_matrix
[
i
];
s
->
intra_matrix
[
j
]
=
v
;
s
->
chroma_intra_matrix
[
j
]
=
v
;
v
=
ff_mpeg1_default_non_intra_matrix
[
i
];
s
->
inter_matrix
[
j
]
=
v
;
s
->
chroma_inter_matrix
[
j
]
=
v
;
}
/* we set mpeg2 parameters so that it emulates mpeg1 */
s
->
progressive_sequence
=
1
;
s
->
progressive_frame
=
1
;
s
->
picture_structure
=
PICT_FRAME
;
s
->
frame_pred_frame_dct
=
1
;
s
->
mpeg2
=
1
;
avctx
->
sub_id
=
2
;
/* indicates mpeg1 */
return
0
;
}
static
void
mpeg_decode_user_data
(
AVCodecContext
*
avctx
,
static
void
mpeg_decode_user_data
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buf
,
int
buf_size
)
const
uint8_t
*
buf
,
int
buf_size
)
{
{
...
@@ -2260,6 +2305,10 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
...
@@ -2260,6 +2305,10 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
}
}
}
}
#endif
#endif
if
(
s
->
mpeg_enc_ctx_allocated
==
0
&&
avctx
->
codec_tag
==
ff_get_fourcc
(
"VCR2"
))
vcr2_init_sequence
(
avctx
);
for
(;;)
{
for
(;;)
{
/* find start next code */
/* find start next code */
start_code
=
find_start_code
(
&
buf_ptr
,
buf_end
);
start_code
=
find_start_code
(
&
buf_ptr
,
buf_end
);
...
...
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