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
9110a0e3
Commit
9110a0e3
authored
Dec 17, 2006
by
Aurelien Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for VP60 and VP61.
Originally committed as revision 7329 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
95cefcb4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
14 deletions
+40
-14
ffmpeg-doc.texi
doc/ffmpeg-doc.texi
+1
-1
avcodec.h
libavcodec/avcodec.h
+2
-2
vp56.h
libavcodec/vp56.h
+1
-0
vp6.c
libavcodec/vp6.c
+22
-7
vp6data.h
libavcodec/vp6data.h
+9
-1
nsvdec.c
libavformat/nsvdec.c
+3
-3
riff.c
libavformat/riff.c
+2
-0
No files found.
doc/ffmpeg-doc.texi
View file @
9110a0e3
...
...
@@ -968,7 +968,7 @@ following image formats are supported:
@item Sorenson Video 3 @tab @tab X @tab fourcc: SVQ3
@item On2 VP3 @tab @tab X @tab still experimental
@item On2 VP5 @tab @tab X @tab fourcc: VP50
@item On2 VP6 @tab @tab X @tab fourcc: VP62
@item On2 VP6 @tab @tab X @tab fourcc: VP6
0,VP61,VP6
2
@item Theora @tab @tab X @tab still experimental
@item Intel Indeo 3 @tab @tab X
@item FLV @tab X @tab X @tab Sorenson H.263 used in Flash
...
...
libavcodec/avcodec.h
View file @
9110a0e3
...
...
@@ -37,8 +37,8 @@ extern "C" {
#define AV_STRINGIFY(s) AV_TOSTRING(s)
#define AV_TOSTRING(s) #s
#define LIBAVCODEC_VERSION_INT ((51<<16)+(2
6
<<8)+0)
#define LIBAVCODEC_VERSION 51.2
6
.0
#define LIBAVCODEC_VERSION_INT ((51<<16)+(2
7
<<8)+0)
#define LIBAVCODEC_VERSION 51.2
7
.0
#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
...
...
libavcodec/vp56.h
View file @
9110a0e3
...
...
@@ -76,6 +76,7 @@ struct vp56_context {
uint8_t
*
edge_emu_buffer_alloc
;
uint8_t
*
edge_emu_buffer
;
vp56_range_coder_t
c
;
int
sub_version
;
/* frame info */
int
plane_width
[
3
];
...
...
libavcodec/vp6.c
View file @
9110a0e3
...
...
@@ -42,7 +42,9 @@ static int vp6_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size,
int
*
golden_frame
)
{
vp56_range_coder_t
*
c
=
&
s
->
c
;
int
parse_filter_info
;
int
parse_filter_info
=
0
;
int
vrt_shift
=
0
;
int
sub_version
;
int
rows
,
cols
;
int
res
=
1
;
...
...
@@ -53,7 +55,10 @@ static int vp6_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size,
vp56_init_dequant
(
s
,
(
buf
[
0
]
>>
1
)
&
0x3F
);
if
(
s
->
frames
[
VP56_FRAME_CURRENT
].
key_frame
)
{
if
((
buf
[
1
]
&
0xFE
)
!=
0x46
)
/* would be 0x36 for VP61 */
sub_version
=
buf
[
1
]
>>
3
;
if
(
sub_version
>
8
)
return
0
;
if
((
buf
[
1
]
&
0x06
)
!=
0x06
)
return
0
;
if
(
buf
[
1
]
&
1
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"interlacing not supported
\n
"
);
...
...
@@ -79,27 +84,37 @@ static int vp6_parse_header(vp56_context_t *s, uint8_t *buf, int buf_size,
vp56_rac_gets
(
c
,
2
);
parse_filter_info
=
1
;
if
(
sub_version
<
8
)
vrt_shift
=
5
;
s
->
sub_version
=
sub_version
;
}
else
{
if
(
!
s
->
sub_version
)
return
0
;
vp56_init_range_decoder
(
c
,
buf
+
1
,
buf_size
-
1
);
*
golden_frame
=
vp56_rac_get
(
c
);
s
->
deblock_filtering
=
vp56_rac_get
(
c
);
if
(
s
->
deblock_filtering
)
vp56_rac_get
(
c
);
parse_filter_info
=
vp56_rac_get
(
c
);
if
(
s
->
sub_version
>
7
)
parse_filter_info
=
vp56_rac_get
(
c
);
}
if
(
parse_filter_info
)
{
if
(
vp56_rac_get
(
c
))
{
s
->
filter_mode
=
2
;
s
->
sample_variance_threshold
=
vp56_rac_gets
(
c
,
5
);
s
->
sample_variance_threshold
=
vp56_rac_gets
(
c
,
5
)
<<
vrt_shift
;
s
->
max_vector_length
=
2
<<
vp56_rac_gets
(
c
,
3
);
}
else
if
(
vp56_rac_get
(
c
))
{
s
->
filter_mode
=
1
;
}
else
{
s
->
filter_mode
=
0
;
}
s
->
filter_selection
=
vp56_rac_gets
(
c
,
4
);
if
(
s
->
sub_version
>
7
)
s
->
filter_selection
=
vp56_rac_gets
(
c
,
4
);
else
s
->
filter_selection
=
16
;
}
vp56_rac_get
(
c
);
...
...
@@ -439,8 +454,8 @@ static void vp6_filter(vp56_context_t *s, uint8_t *dst, uint8_t *src,
(
FFABS
(
mv
.
x
)
>
s
->
max_vector_length
||
FFABS
(
mv
.
y
)
>
s
->
max_vector_length
))
{
filter4
=
0
;
}
else
if
(
!
s
->
sample_variance_threshold
||
(
vp6_block_variance
(
src
+
offset1
,
stride
)
}
else
if
(
s
->
sample_variance_threshold
&&
(
vp6_block_variance
(
src
+
offset1
,
stride
)
<
s
->
sample_variance_threshold
))
{
filter4
=
0
;
}
...
...
libavcodec/vp6data.h
View file @
9110a0e3
...
...
@@ -144,7 +144,7 @@ static const uint8_t vp6_coeff_groups[] = {
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
};
static
const
int16_t
vp6_block_copy_filter
[
1
6
][
8
][
4
]
=
{
static
const
int16_t
vp6_block_copy_filter
[
1
7
][
8
][
4
]
=
{
{
{
0
,
128
,
0
,
0
},
/* 0 */
{
-
3
,
122
,
9
,
0
},
{
-
4
,
109
,
24
,
-
1
},
...
...
@@ -273,6 +273,14 @@ static const int16_t vp6_block_copy_filter[16][8][4] = {
{
-
11
,
59
,
99
,
-
19
},
{
-
6
,
38
,
114
,
-
18
},
{
-
2
,
18
,
124
,
-
12
}
},
{
{
0
,
128
,
0
,
0
},
/* 16 */
{
-
4
,
118
,
16
,
-
2
},
{
-
7
,
106
,
34
,
-
5
},
{
-
8
,
90
,
53
,
-
7
},
{
-
8
,
72
,
72
,
-
8
},
{
-
7
,
53
,
90
,
-
8
},
{
-
5
,
34
,
106
,
-
7
},
{
-
2
,
16
,
118
,
-
4
}
},
};
static
const
vp56_tree_t
vp6_pcr_tree
[]
=
{
...
...
libavformat/nsvdec.c
View file @
9110a0e3
...
...
@@ -189,13 +189,13 @@ static const CodecTag nsv_codec_video_tags[] = {
{
CODEC_ID_VP3
,
MKTAG
(
'V'
,
'P'
,
'3'
,
'1'
)
},
{
CODEC_ID_VP5
,
MKTAG
(
'V'
,
'P'
,
'5'
,
' '
)
},
{
CODEC_ID_VP5
,
MKTAG
(
'V'
,
'P'
,
'5'
,
'0'
)
},
{
CODEC_ID_VP6
,
MKTAG
(
'V'
,
'P'
,
'6'
,
' '
)
},
{
CODEC_ID_VP6
,
MKTAG
(
'V'
,
'P'
,
'6'
,
'0'
)
},
{
CODEC_ID_VP6
,
MKTAG
(
'V'
,
'P'
,
'6'
,
'1'
)
},
{
CODEC_ID_VP6
,
MKTAG
(
'V'
,
'P'
,
'6'
,
'2'
)
},
/*
{ CODEC_ID_VP4, MKTAG('V', 'P', '4', ' ') },
{ CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') },
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', ' ') },
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
{ CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
*/
{
CODEC_ID_XVID
,
MKTAG
(
'X'
,
'V'
,
'I'
,
'D'
)
},
/* cf sample xvid decoder from nsv_codec_sdk.zip */
{
CODEC_ID_RAWVIDEO
,
MKTAG
(
'R'
,
'G'
,
'B'
,
'3'
)
},
...
...
libavformat/riff.c
View file @
9110a0e3
...
...
@@ -118,6 +118,8 @@ const CodecTag codec_bmp_tags[] = {
{
CODEC_ID_VP3
,
MKTAG
(
'V'
,
'P'
,
'3'
,
'1'
)
},
{
CODEC_ID_VP3
,
MKTAG
(
'V'
,
'P'
,
'3'
,
'0'
)
},
{
CODEC_ID_VP5
,
MKTAG
(
'V'
,
'P'
,
'5'
,
'0'
)
},
{
CODEC_ID_VP6
,
MKTAG
(
'V'
,
'P'
,
'6'
,
'0'
)
},
{
CODEC_ID_VP6
,
MKTAG
(
'V'
,
'P'
,
'6'
,
'1'
)
},
{
CODEC_ID_VP6
,
MKTAG
(
'V'
,
'P'
,
'6'
,
'2'
)
},
{
CODEC_ID_ASV1
,
MKTAG
(
'A'
,
'S'
,
'V'
,
'1'
)
},
{
CODEC_ID_ASV2
,
MKTAG
(
'A'
,
'S'
,
'V'
,
'2'
)
},
...
...
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