Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
x264
Commits
4c8ccfe6
Commit
4c8ccfe6
authored
Oct 02, 2005
by
Loren Merritt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics
git-svn-id:
svn://svn.videolan.org/x264/trunk@312
df754926-b1dd-0310-bc7b-ec298dee348c
parent
ce3a4224
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
29 deletions
+21
-29
encoder/encoder.c
encoder/encoder.c
+1
-0
encoder/ratecontrol.c
encoder/ratecontrol.c
+2
-11
matroska.h
matroska.h
+1
-1
x264.c
x264.c
+11
-11
x264.h
x264.h
+6
-6
No files found.
encoder/encoder.c
View file @
4c8ccfe6
...
...
@@ -389,6 +389,7 @@ static int x264_validate_parameters( x264_t *h )
h
->
mb
.
b_lossless
=
1
;
h
->
param
.
analyse
.
b_transform_8x8
=
0
;
h
->
param
.
i_cqm_preset
=
X264_CQM_FLAT
;
h
->
param
.
psz_cqm_file
=
NULL
;
h
->
param
.
rc
.
f_ip_factor
=
1
;
h
->
param
.
rc
.
f_pb_factor
=
1
;
h
->
param
.
analyse
.
b_psnr
=
0
;
...
...
encoder/ratecontrol.c
View file @
4c8ccfe6
...
...
@@ -263,25 +263,16 @@ int x264_ratecontrol_new( x264_t *h )
/* Load stat file and init 2pass algo */
if
(
h
->
param
.
rc
.
b_stat_read
)
{
int
stats_size
;
char
*
p
,
*
stats_in
;
FILE
*
stats_file
;
/* read 1st pass stats */
assert
(
h
->
param
.
rc
.
psz_stat_in
);
stats_
file
=
fopen
(
h
->
param
.
rc
.
psz_stat_in
,
"rb"
);
if
(
!
stats_
file
)
stats_
in
=
x264_slurp_file
(
h
->
param
.
rc
.
psz_stat_in
);
if
(
!
stats_
in
)
{
x264_log
(
h
,
X264_LOG_ERROR
,
"ratecontrol_init: can't open stats file
\n
"
);
return
-
1
;
}
// FIXME: error checking
fseek
(
stats_file
,
0
,
SEEK_END
);
stats_size
=
ftell
(
stats_file
);
fseek
(
stats_file
,
0
,
SEEK_SET
);
stats_in
=
x264_malloc
(
stats_size
+
10
);
fread
(
stats_in
,
1
,
stats_size
,
stats_file
);
fclose
(
stats_file
);
/* find number of pics */
p
=
stats_in
;
...
...
matroska.h
View file @
4c8ccfe6
/*****************************************************************************
* matroska.
c
:
* matroska.
h
:
*****************************************************************************
* Copyright (C) 2005 x264 project
* $Id: $
...
...
x264.c
View file @
4c8ccfe6
...
...
@@ -567,7 +567,7 @@ static int Parse( int argc, char **argv,
case
OPT_SEEK
:
opt
->
i_seek
=
atoi
(
optarg
);
break
;
case
'o'
:
case
'o'
:
if
(
!
strncasecmp
(
optarg
+
strlen
(
optarg
)
-
4
,
".mp4"
,
4
)
)
{
#ifdef MP4_OUTPUT
...
...
@@ -581,14 +581,14 @@ static int Parse( int argc, char **argv,
return
-
1
;
#endif
}
else
if
(
!
strncasecmp
(
optarg
+
strlen
(
optarg
)
-
4
,
".mkv"
,
4
)
)
{
p_open_outfile
=
open_file_mkv
;
else
if
(
!
strncasecmp
(
optarg
+
strlen
(
optarg
)
-
4
,
".mkv"
,
4
)
)
{
p_open_outfile
=
open_file_mkv
;
p_write_nalu
=
write_nalu_mkv
;
p_set_outfile_param
=
set_param_mkv
;
p_set_eop
=
set_eop_mkv
;
p_close_outfile
=
close_file_mkv
;
}
}
if
(
!
strcmp
(
optarg
,
"-"
)
)
opt
->
hout
=
stdout
;
else
if
(
p_open_outfile
(
optarg
,
&
opt
->
hout
)
)
...
...
@@ -1720,7 +1720,7 @@ static int set_param_mkv( hnd_t handle, x264_param_t *p_param )
if
(
dw
>
0
&&
dh
>
0
)
{
int64_t
a
=
dw
,
b
=
dh
;
int64_t
a
=
dw
,
b
=
dh
;
for
(;;)
{
...
...
@@ -1731,8 +1731,8 @@ static int set_param_mkv( hnd_t handle, x264_param_t *p_param )
b
=
c
;
}
dw
/=
b
;
dh
/=
b
;
dw
/=
b
;
dh
/=
b
;
}
p_mkv
->
d_width
=
(
int
)
dw
;
...
...
@@ -1781,7 +1781,7 @@ static int write_nalu_mkv( hnd_t handle, uint8_t *p_nalu, int i_size )
if
(
!
p_mkv
->
b_writing_frame
)
{
if
(
mk_startFrame
(
p_mkv
->
w
)
<
0
)
return
-
1
;
return
-
1
;
p_mkv
->
b_writing_frame
=
1
;
}
psize
=
i_size
-
4
;
...
...
@@ -1789,8 +1789,8 @@ static int write_nalu_mkv( hnd_t handle, uint8_t *p_nalu, int i_size )
dsize
[
1
]
=
psize
>>
8
;
dsize
[
2
]
=
psize
;
if
(
mk_addFrameData
(
p_mkv
->
w
,
dsize
,
3
)
<
0
||
mk_addFrameData
(
p_mkv
->
w
,
p_nalu
+
4
,
i_size
-
4
)
<
0
)
return
-
1
;
mk_addFrameData
(
p_mkv
->
w
,
p_nalu
+
4
,
i_size
-
4
)
<
0
)
return
-
1
;
break
;
default:
...
...
x264.h
View file @
4c8ccfe6
...
...
@@ -154,12 +154,12 @@ typedef struct
int
i_cqm_preset
;
char
*
psz_cqm_file
;
/* JM format */
int8_t
cqm_4iy
[
16
];
/* used only if i_cqm_preset == X264_CQM_CUSTOM */
int8_t
cqm_4ic
[
16
];
int8_t
cqm_4py
[
16
];
int8_t
cqm_4pc
[
16
];
int8_t
cqm_8iy
[
64
];
int8_t
cqm_8py
[
64
];
u
int8_t
cqm_4iy
[
16
];
/* used only if i_cqm_preset == X264_CQM_CUSTOM */
u
int8_t
cqm_4ic
[
16
];
u
int8_t
cqm_4py
[
16
];
u
int8_t
cqm_4pc
[
16
];
u
int8_t
cqm_8iy
[
64
];
u
int8_t
cqm_8py
[
64
];
/* Log */
void
(
*
pf_log
)(
void
*
,
int
i_level
,
const
char
*
psz
,
va_list
);
...
...
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