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
cc6de104
Commit
cc6de104
authored
Nov 07, 2007
by
Aurelien Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
split wmv2 in its own file
Originally committed as revision 10951 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ad426590
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
17 deletions
+30
-17
Makefile
libavcodec/Makefile
+2
-2
msmpeg4.c
libavcodec/msmpeg4.c
+2
-15
msmpeg4.h
libavcodec/msmpeg4.h
+21
-0
wmv2.c
libavcodec/wmv2.c
+5
-0
No files found.
libavcodec/Makefile
View file @
cc6de104
...
...
@@ -209,8 +209,8 @@ OBJS-$(CONFIG_WMAV1_ENCODER) += wmaenc.o wma.o mdct.o fft.o
OBJS-$(CONFIG_WMAV2_ENCODER)
+=
wmaenc.o
wma.o
mdct.o
fft.o
OBJS-$(CONFIG_WMV1_DECODER)
+=
h263dec.o
h263.o
OBJS-$(CONFIG_WMV1_ENCODER)
+=
mpegvideo_enc.o
motion_est.o
ratecontrol.o
h263.o
OBJS-$(CONFIG_WMV2_DECODER)
+=
msmpeg4.o
msmpeg4data.o
h263dec.o
h263.o
OBJS-$(CONFIG_WMV2_ENCODER)
+=
msmpeg4.o
msmpeg4data.o
mpegvideo_enc.o
motion_est.o
ratecontrol.o
h263.o
OBJS-$(CONFIG_WMV2_DECODER)
+=
wmv2.o
msmpeg4.o
msmpeg4data.o
h263dec.o
h263.o
OBJS-$(CONFIG_WMV2_ENCODER)
+=
wmv2.o
msmpeg4.o
msmpeg4data.o
mpegvideo_enc.o
motion_est.o
ratecontrol.o
h263.o
OBJS-$(CONFIG_WMV3_DECODER)
+=
vc1.o
vc1data.o
vc1dsp.o
OBJS-$(CONFIG_WNV1_DECODER)
+=
wnv1.o
OBJS-$(CONFIG_WS_SND1_DECODER)
+=
ws-snd1.o
...
...
libavcodec/msmpeg4.c
View file @
cc6de104
...
...
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "msmpeg4.h"
/*
* You can also call this codec : MPEG4 with a twist !
...
...
@@ -42,7 +43,6 @@
#define DC_VLC_BITS 9
#define CBPY_VLC_BITS 6
#define INTER_INTRA_VLC_BITS 3
#define V1_INTRA_CBPC_VLC_BITS 6
#define V1_INTER_CBPC_VLC_BITS 6
#define V2_INTRA_CBPC_VLC_BITS 3
...
...
@@ -50,8 +50,6 @@
#define MV_VLC_BITS 9
#define V2_MV_VLC_BITS 9
#define TEX_VLC_BITS 9
#define MB_NON_INTRA_VLC_BITS 9
#define MB_INTRA_VLC_BITS 9
#define II_BITRATE 128*1024
#define MBAC_BITRATE 50*1024
...
...
@@ -61,12 +59,7 @@
static
uint32_t
v2_dc_lum_table
[
512
][
2
];
static
uint32_t
v2_dc_chroma_table
[
512
][
2
];
void
ff_msmpeg4_encode_block
(
MpegEncContext
*
s
,
DCTELEM
*
block
,
int
n
);
int
ff_msmpeg4_decode_block
(
MpegEncContext
*
s
,
DCTELEM
*
block
,
int
n
,
int
coded
,
const
uint8_t
*
scantable
);
static
int
msmpeg4_decode_dc
(
MpegEncContext
*
s
,
int
n
,
int
*
dir_ptr
);
int
ff_msmpeg4_decode_motion
(
MpegEncContext
*
s
,
int
*
mx_ptr
,
int
*
my_ptr
);
static
void
init_h263_dc_for_msmpeg4
(
void
);
static
inline
void
msmpeg4_memsetw
(
short
*
tab
,
int
val
,
int
n
);
#ifdef CONFIG_ENCODERS
...
...
@@ -75,7 +68,6 @@ static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run,
#endif //CONFIG_ENCODERS
static
int
msmpeg4v12_decode_mb
(
MpegEncContext
*
s
,
DCTELEM
block
[
6
][
64
]);
static
int
msmpeg4v34_decode_mb
(
MpegEncContext
*
s
,
DCTELEM
block
[
6
][
64
]);
int
ff_wmv2_decode_mb
(
MpegEncContext
*
s
,
DCTELEM
block
[
6
][
64
]);
/* vc1 externs */
extern
uint8_t
wmv3_dc_scale_table
[
32
];
...
...
@@ -1145,6 +1137,7 @@ int ff_msmpeg4_decode_init(MpegEncContext *s)
s
->
decode_mb
=
msmpeg4v34_decode_mb
;
break
;
case
5
:
if
(
ENABLE_WMV2_DECODER
)
s
->
decode_mb
=
ff_wmv2_decode_mb
;
case
6
:
//FIXME + TODO VC1 decode mb
...
...
@@ -1949,9 +1942,3 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s,
*
my_ptr
=
my
;
return
0
;
}
/* cleanest way to support it
* there is too much shared between versions so that we cant have 1 file per version & 1 common
* as allmost everything would be in the common file
*/
#include "wmv2.c"
libavcodec/msmpeg4.h
View file @
cc6de104
...
...
@@ -27,6 +27,27 @@
#define FFMPEG_MSMPEG4_H
#include "config.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#define INTER_INTRA_VLC_BITS 3
#define MB_NON_INTRA_VLC_BITS 9
#define MB_INTRA_VLC_BITS 9
extern
VLC
ff_mb_non_intra_vlc
[
4
];
extern
VLC
ff_inter_intra_vlc
;
void
ff_msmpeg4_code012
(
PutBitContext
*
pb
,
int
n
);
void
ff_msmpeg4_encode_block
(
MpegEncContext
*
s
,
DCTELEM
*
block
,
int
n
);
void
ff_msmpeg4_handle_slices
(
MpegEncContext
*
s
);
void
ff_msmpeg4_encode_motion
(
MpegEncContext
*
s
,
int
mx
,
int
my
);
int
ff_msmpeg4_coded_block_pred
(
MpegEncContext
*
s
,
int
n
,
uint8_t
**
coded_block_ptr
);
int
ff_msmpeg4_decode_motion
(
MpegEncContext
*
s
,
int
*
mx_ptr
,
int
*
my_ptr
);
int
ff_msmpeg4_decode_block
(
MpegEncContext
*
s
,
DCTELEM
*
block
,
int
n
,
int
coded
,
const
uint8_t
*
scan_table
);
int
ff_wmv2_decode_mb
(
MpegEncContext
*
s
,
DCTELEM
block
[
6
][
64
]);
#define ENABLE_MSMPEG4_DECODER (ENABLE_MSMPEG4V1_DECODER || \
ENABLE_MSMPEG4V2_DECODER || \
...
...
libavcodec/wmv2.c
View file @
cc6de104
...
...
@@ -23,6 +23,11 @@
* wmv2 codec.
*/
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "msmpeg4.h"
#include "msmpeg4data.h"
#include "simple_idct.h"
#define SKIP_TYPE_NONE 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