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
baaf3f46
Commit
baaf3f46
authored
Jan 04, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SVCD scan offset stuff
Originally committed as revision 2660 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
c953e797
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
ffmpeg.c
ffmpeg.c
+6
-0
avcodec.h
libavcodec/avcodec.h
+1
-0
mpeg12.c
libavcodec/mpeg12.c
+9
-1
mpeg12data.h
libavcodec/mpeg12data.h
+7
-0
No files found.
ffmpeg.c
View file @
baaf3f46
...
...
@@ -121,6 +121,7 @@ static int use_aiv = 0;
static
int
use_umv
=
0
;
static
int
use_alt_scan
=
0
;
static
int
use_trell
=
0
;
static
int
use_scan_offset
=
0
;
static
int
do_deinterlace
=
0
;
static
int
do_interlace_dct
=
0
;
static
int
do_interlace_me
=
0
;
...
...
@@ -2399,6 +2400,9 @@ static void opt_output_file(const char *filename)
if
(
use_trell
)
{
video_enc
->
flags
|=
CODEC_FLAG_TRELLIS_QUANT
;
}
if
(
use_scan_offset
)
{
video_enc
->
flags
|=
CODEC_FLAG_SVCD_SCAN_OFFSET
;
}
if
(
b_frames
)
{
video_enc
->
max_b_frames
=
b_frames
;
video_enc
->
b_frame_strategy
=
0
;
...
...
@@ -2906,6 +2910,7 @@ static void opt_target(const char *arg)
video_rc_max_rate
=
2516000
;
video_rc_min_rate
=
0
;
//1145000;
video_rc_buffer_size
=
224
*
1024
*
8
;
use_scan_offset
=
1
;
audio_bit_rate
=
224000
;
audio_sample_rate
=
44100
;
...
...
@@ -3034,6 +3039,7 @@ const OptionDef options[] = {
{
"umv"
,
OPT_BOOL
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
&
use_umv
},
"enable Unlimited Motion Vector (h263+)"
},
{
"alt"
,
OPT_BOOL
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
&
use_alt_scan
},
"enable alternate scantable (mpeg2)"
},
{
"trell"
,
OPT_BOOL
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
&
use_trell
},
"enable trellis quantization"
},
{
"scan_offset"
,
OPT_BOOL
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
&
use_scan_offset
},
"enable SVCD Scan Offset placeholder"
},
{
"intra_matrix"
,
HAS_ARG
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
opt_intra_matrix
},
"specify intra matrix coeffs"
,
"matrix"
},
{
"inter_matrix"
,
HAS_ARG
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
opt_inter_matrix
},
"specify inter matrix coeffs"
,
"matrix"
},
{
"top"
,
HAS_ARG
|
OPT_EXPERT
|
OPT_VIDEO
,
{(
void
*
)
opt_top_field_first
},
"top=1/bottom=0/auto=-1 field first"
,
""
},
...
...
libavcodec/avcodec.h
View file @
baaf3f46
...
...
@@ -267,6 +267,7 @@ static const __attribute__((unused)) int Motion_Est_QTab[] =
#define CODEC_FLAG_LOOP_FILTER 0x00000800 ///< loop filter
#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
#define CODEC_FLAG_INTERLACED_ME 0x20000000 ///< interlaced motion estimation
#define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< will reserve space for SVCD scan offset user data
/* Unsupported options :
* Syntax Arithmetic coding (SAC)
* Reference Picture Selection
...
...
libavcodec/mpeg12.c
View file @
baaf3f46
...
...
@@ -473,6 +473,14 @@ void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
put_bits
(
&
s
->
pb
,
1
,
s
->
progressive_frame
);
put_bits
(
&
s
->
pb
,
1
,
0
);
//composite_display_flag
}
if
(
s
->
flags
&
CODEC_FLAG_SVCD_SCAN_OFFSET
){
int
i
;
put_header
(
s
,
USER_START_CODE
);
for
(
i
=
0
;
i
<
sizeof
(
svcd_scan_offset_placeholder
);
i
++
){
put_bits
(
&
s
->
pb
,
8
,
svcd_scan_offset_placeholder
[
i
]);
}
}
s
->
mb_y
=
0
;
ff_mpeg1_encode_slice_header
(
s
);
...
...
@@ -1809,7 +1817,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx,
static
void
mpeg_decode_sequence_extension
(
MpegEncContext
*
s
)
{
int
horiz_size_ext
,
vert_size_ext
;
int
bit_rate_ext
,
vbv_buf_ext
;
int
bit_rate_ext
;
int
frame_rate_ext_n
,
frame_rate_ext_d
;
int
level
,
profile
;
...
...
libavcodec/mpeg12data.h
View file @
baaf3f46
...
...
@@ -433,3 +433,10 @@ static const AVRational mpeg2_aspect[16]={
{
0
,
1
},
};
static
const
uint8_t
svcd_scan_offset_placeholder
[
14
]
=
{
0x10
,
0x0E
,
0x00
,
0x80
,
0x81
,
0x00
,
0x80
,
0x81
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
};
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