Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
71baa3cd
Commit
71baa3cd
authored
May 09, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ffmpeg: now ffmpeg has a SVQ3 decoder, so use it :)
parent
d40a1961
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
4 deletions
+36
-4
modules/codec/ffmpeg/ffmpeg.c
modules/codec/ffmpeg/ffmpeg.c
+8
-1
modules/codec/ffmpeg/ffmpeg.h
modules/codec/ffmpeg/ffmpeg.h
+3
-2
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video.c
+25
-1
No files found.
modules/codec/ffmpeg/ffmpeg.c
View file @
71baa3cd
...
...
@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.3
5 2003/05/07 15:44:59
fenrir Exp $
* $Id: ffmpeg.c,v 1.3
6 2003/05/09 23:23:45
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -503,6 +503,13 @@ static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t i_fourcc,
i_codec
=
CODEC_ID_SVQ1
;
psz_name
=
"SVQ-1 (Sorenson Video v1)"
;
break
;
#if LIBAVCODEC_BUILD >= 4666
case
FOURCC_SVQ3
:
i_cat
=
VIDEO_ES
;
i_codec
=
CODEC_ID_SVQ3
;
psz_name
=
"SVQ-3 (Sorenson Video v3)"
;
break
;
#endif
case
FOURCC_DIVX
:
case
FOURCC_divx
:
...
...
modules/codec/ffmpeg/ffmpeg.h
View file @
71baa3cd
...
...
@@ -2,7 +2,7 @@
* ffmpeg_vdec.h: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ffmpeg.h,v 1.1
7 2003/04/17 10:58:30
fenrir Exp $
* $Id: ffmpeg.h,v 1.1
8 2003/05/09 23:23:45
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -137,8 +137,9 @@ int E_( GetPESData )( u8 *p_buf, int i_max, pes_packet_t *p_pes );
#define FOURCC_I263 VLC_FOURCC('I','2','6','3')
#define FOURCC_i263 VLC_FOURCC('i','2','6','3')
/* Sorenson v1 */
/* Sorenson v1
/3
*/
#define FOURCC_SVQ1 VLC_FOURCC( 'S', 'V', 'Q', '1' )
#define FOURCC_SVQ3 VLC_FOURCC( 'S', 'V', 'Q', '3' )
/* mjpeg */
#define FOURCC_MJPG VLC_FOURCC( 'M', 'J', 'P', 'G' )
...
...
modules/codec/ffmpeg/video.c
View file @
71baa3cd
...
...
@@ -2,7 +2,7 @@
* video.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video.c,v 1.2
6 2003/05/07 15:44:59
fenrir Exp $
* $Id: video.c,v 1.2
7 2003/05/09 23:23:45
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -194,6 +194,16 @@ static vout_thread_t *ffmpeg_CreateVout( vdec_thread_t *p_vdec,
* ffmpeg codec will be open, some memory allocated. But Vout is not yet
* open (done after the first decoded frame)
*****************************************************************************/
static
inline
void
SetDWBE
(
void
*
data
,
uint32_t
dw
)
{
uint8_t
*
p
=
data
;
p
[
0
]
=
(
dw
>>
24
)
&
0xff
;
p
[
1
]
=
(
dw
>>
16
)
&
0xff
;
p
[
2
]
=
(
dw
>>
8
)
&
0xff
;
p
[
3
]
=
(
dw
)
&
0xff
;
}
int
E_
(
InitThread_Video
)(
vdec_thread_t
*
p_vdec
)
{
int
i_tmp
;
...
...
@@ -284,6 +294,20 @@ int E_( InitThread_Video )( vdec_thread_t *p_vdec )
(
void
*
)
&
p_vdec
->
p_format
[
1
],
i_size
);
}
#if LIBAVCODEC_BUILD >= 4666
else
if
(
p_vdec
->
i_codec_id
==
CODEC_ID_SVQ3
)
{
p_vdec
->
p_context
->
extradata_size
=
i_size
+
28
;
p_vdec
->
p_context
->
extradata
=
malloc
(
p_vdec
->
p_context
->
extradata_size
);
memcpy
(
&
((
char
*
)
p_vdec
->
p_context
->
extradata
)[
0
],
"stsd"
,
4
);
SetDWBE
(
&
((
char
*
)
p_vdec
->
p_context
->
extradata
)[
4
],
0
);
/* version and flag */
SetDWBE
(
&
((
char
*
)
p_vdec
->
p_context
->
extradata
)[
8
],
0
);
/* entry count */
SetDWBE
(
&
((
char
*
)
p_vdec
->
p_context
->
extradata
)[
12
],
0
);
/* sample soun size FIXME */
memcpy
(
&
((
char
*
)
p_vdec
->
p_context
->
extradata
)[
16
],
"SVQ3"
,
4
);
memset
(
&
((
char
*
)
p_vdec
->
p_context
->
extradata
)[
20
],
0
,
8
);
/* reserved[6] and ref index(16b) */
memcpy
(
&
((
char
*
)
p_vdec
->
p_context
->
extradata
)[
28
],
&
p_vdec
->
p_format
[
1
],
i_size
);
}
#endif
else
{
p_vdec
->
p_context
->
extradata_size
=
i_size
;
...
...
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