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
297d9cb3
Commit
297d9cb3
authored
Aug 27, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12enc: add intra_vlc private option.
Deprecate CODEC_FLAG2_INTRA_VLC.
parent
d2f119a1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
6 deletions
+38
-6
asm-offsets.h
libavcodec/arm/asm-offsets.h
+6
-6
avcodec.h
libavcodec/avcodec.h
+2
-0
mpeg12enc.c
libavcodec/mpeg12enc.c
+22
-0
mpegvideo.h
libavcodec/mpegvideo.h
+1
-0
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+2
-0
options.c
libavcodec/options.c
+2
-0
version.h
libavcodec/version.h
+3
-0
No files found.
libavcodec/arm/asm-offsets.h
View file @
297d9cb3
...
...
@@ -29,11 +29,11 @@
#endif
/* MpegEncContext */
#define Y_DC_SCALE 0xa
8
#define C_DC_SCALE 0x
ac
#define AC_PRED 0xb
0
#define BLOCK_LAST_INDEX 0xb
4
#define H263_AIC 0xe
4
#define INTER_SCANTAB_RASTER_END 0x1
2c
#define Y_DC_SCALE 0xa
c
#define C_DC_SCALE 0x
b0
#define AC_PRED 0xb
4
#define BLOCK_LAST_INDEX 0xb
8
#define H263_AIC 0xe
8
#define INTER_SCANTAB_RASTER_END 0x1
30
#endif
/* AVCODEC_ARM_ASM_OFFSETS_H */
libavcodec/avcodec.h
View file @
297d9cb3
...
...
@@ -616,7 +616,9 @@ typedef struct RcOverride{
#define CODEC_FLAG2_AUD 0x00000200 ///< H.264 access unit delimiters
#define CODEC_FLAG2_BRDO 0x00000400 ///< B-frame rate-distortion optimization
#endif
#if FF_API_MPEGVIDEO_GLOBAL_OPTS
#define CODEC_FLAG2_INTRA_VLC 0x00000800 ///< Use MPEG-2 intra VLC table.
#endif
#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC).
#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format.
#define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skipping
...
...
libavcodec/mpeg12enc.c
View file @
297d9cb3
...
...
@@ -33,6 +33,8 @@
#include "mpeg12data.h"
#include "bytestream.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
static
const
uint8_t
inv_non_linear_qscale
[
13
]
=
{
0
,
2
,
4
,
6
,
8
,
...
...
@@ -925,6 +927,24 @@ static void mpeg1_encode_block(MpegEncContext *s,
put_bits
(
&
s
->
pb
,
table_vlc
[
112
][
1
],
table_vlc
[
112
][
0
]);
}
#define OFFSET(x) offsetof(MpegEncContext, x)
#define VE AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
static
const
AVOption
options
[]
=
{
{
"intra_vlc"
,
"Use MPEG-2 intra VLC table."
,
OFFSET
(
intra_vlc_format
),
FF_OPT_TYPE_INT
,
{
0
},
0
,
1
,
VE
},
{
NULL
},
};
#define mpeg12_class(x)\
static const AVClass mpeg## x ##_class = {\
.class_name = "mpeg" #x "video encoder",\
.item_name = av_default_item_name,\
.option = options,\
.version = LIBAVUTIL_VERSION_INT,\
};
mpeg12_class
(
1
)
mpeg12_class
(
2
)
AVCodec
ff_mpeg1video_encoder
=
{
.
name
=
"mpeg1video"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
...
...
@@ -937,6 +957,7 @@ AVCodec ff_mpeg1video_encoder = {
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_NONE
},
.
capabilities
=
CODEC_CAP_DELAY
|
CODEC_CAP_SLICE_THREADS
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"MPEG-1 video"
),
.
priv_class
=
&
mpeg1_class
,
};
AVCodec
ff_mpeg2video_encoder
=
{
...
...
@@ -951,4 +972,5 @@ AVCodec ff_mpeg2video_encoder = {
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV420P
,
PIX_FMT_YUV422P
,
PIX_FMT_NONE
},
.
capabilities
=
CODEC_CAP_DELAY
|
CODEC_CAP_SLICE_THREADS
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"MPEG-2 video"
),
.
priv_class
=
&
mpeg2_class
,
};
libavcodec/mpegvideo.h
View file @
297d9cb3
...
...
@@ -199,6 +199,7 @@ typedef struct MotionEstContext{
* MpegEncContext.
*/
typedef
struct
MpegEncContext
{
AVClass
*
class
;
struct
AVCodecContext
*
avctx
;
/* the following parameters must be initialized before encoding */
int
width
,
height
;
///< picture size. must be a multiple of 16
...
...
libavcodec/mpegvideo_enc.c
View file @
297d9cb3
...
...
@@ -336,7 +336,9 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
s
->
obmc
=
!!
(
s
->
flags
&
CODEC_FLAG_OBMC
);
s
->
loop_filter
=
!!
(
s
->
flags
&
CODEC_FLAG_LOOP_FILTER
);
s
->
alternate_scan
=
!!
(
s
->
flags
&
CODEC_FLAG_ALT_SCAN
);
#if FF_API_MPEGVIDEO_GLOBAL_OPTS
s
->
intra_vlc_format
=
!!
(
s
->
flags2
&
CODEC_FLAG2_INTRA_VLC
);
#endif
s
->
q_scale_type
=
!!
(
s
->
flags2
&
CODEC_FLAG2_NON_LINEAR_QUANT
);
if
(
avctx
->
rc_max_rate
&&
!
avctx
->
rc_buffer_size
){
...
...
libavcodec/options.c
View file @
297d9cb3
...
...
@@ -407,7 +407,9 @@ static const AVOption options[]={
{
"partb8x8"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
X264_PART_B8X8
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"partitions"
},
{
"sc_factor"
,
"multiplied by qscale for each frame and added to scene_change_score"
,
OFFSET
(
scenechange_factor
),
FF_OPT_TYPE_INT
,
{.
dbl
=
6
},
0
,
INT_MAX
,
V
|
E
},
{
"mv0_threshold"
,
NULL
,
OFFSET
(
mv0_threshold
),
FF_OPT_TYPE_INT
,
{.
dbl
=
256
},
0
,
INT_MAX
,
V
|
E
},
#if FF_API_MPEGVIDEO_GLOBAL_OPTS
{
"ivlc"
,
"intra vlc table"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
CODEC_FLAG2_INTRA_VLC
},
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
#endif
{
"b_sensitivity"
,
"adjusts sensitivity of b_frame_strategy 1"
,
OFFSET
(
b_sensitivity
),
FF_OPT_TYPE_INT
,
{.
dbl
=
40
},
1
,
INT_MAX
,
V
|
E
},
{
"compression_level"
,
NULL
,
OFFSET
(
compression_level
),
FF_OPT_TYPE_INT
,
{.
dbl
=
FF_COMPRESSION_DEFAULT
},
INT_MIN
,
INT_MAX
,
V
|
A
|
E
},
{
"min_prediction_order"
,
NULL
,
OFFSET
(
min_prediction_order
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
INT_MIN
,
INT_MAX
,
A
|
E
},
...
...
libavcodec/version.h
View file @
297d9cb3
...
...
@@ -86,5 +86,8 @@
#ifndef FF_API_X264_GLOBAL_OPTS
#define FF_API_X264_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
#ifndef FF_API_MPEGVIDEO_GLOBAL_OPTS
#define FF_API_MPEGVIDEO_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
#endif
/* AVCODEC_VERSION_H */
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