Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e07ef1ad
Commit
e07ef1ad
authored
Apr 22, 2015
by
James Zern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvpxenc: cosmetics: reindent
Signed-off-by:
James Zern
<
jzern@google.com
>
parent
238ec505
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
libvpxenc.c
libavcodec/libvpxenc.c
+13
-13
No files found.
libavcodec/libvpxenc.c
View file @
e07ef1ad
...
@@ -269,7 +269,8 @@ static av_cold int vp8_free(AVCodecContext *avctx)
...
@@ -269,7 +269,8 @@ static av_cold int vp8_free(AVCodecContext *avctx)
#if CONFIG_LIBVPX_VP9_ENCODER
#if CONFIG_LIBVPX_VP9_ENCODER
static
int
set_pix_fmt
(
AVCodecContext
*
avctx
,
vpx_codec_caps_t
codec_caps
,
static
int
set_pix_fmt
(
AVCodecContext
*
avctx
,
vpx_codec_caps_t
codec_caps
,
struct
vpx_codec_enc_cfg
*
enccfg
,
vpx_codec_flags_t
*
flags
,
struct
vpx_codec_enc_cfg
*
enccfg
,
vpx_codec_flags_t
*
flags
,
vpx_img_fmt_t
*
img_fmt
)
{
vpx_img_fmt_t
*
img_fmt
)
{
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
enccfg
->
g_bit_depth
=
enccfg
->
g_input_bit_depth
=
8
;
enccfg
->
g_bit_depth
=
enccfg
->
g_input_bit_depth
=
8
;
#endif
#endif
...
@@ -422,12 +423,12 @@ static av_cold int vpx_init(AVCodecContext *avctx,
...
@@ -422,12 +423,12 @@ static av_cold int vpx_init(AVCodecContext *avctx,
#if CONFIG_LIBVPX_VP9_ENCODER
#if CONFIG_LIBVPX_VP9_ENCODER
||
enccfg
.
rc_end_usage
==
VPX_Q
||
enccfg
.
rc_end_usage
==
VPX_Q
#endif
#endif
)
{
)
{
if
(
ctx
->
crf
<
enccfg
.
rc_min_quantizer
||
ctx
->
crf
>
enccfg
.
rc_max_quantizer
)
{
if
(
ctx
->
crf
<
enccfg
.
rc_min_quantizer
||
ctx
->
crf
>
enccfg
.
rc_max_quantizer
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"CQ level %d must be between minimum and maximum quantizer value (%d-%d)
\n
"
,
"CQ level %d must be between minimum and maximum quantizer value (%d-%d)
\n
"
,
ctx
->
crf
,
enccfg
.
rc_min_quantizer
,
enccfg
.
rc_max_quantizer
);
ctx
->
crf
,
enccfg
.
rc_min_quantizer
,
enccfg
.
rc_max_quantizer
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
}
}
...
@@ -436,7 +437,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
...
@@ -436,7 +437,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
//0-100 (0 => CBR, 100 => VBR)
//0-100 (0 => CBR, 100 => VBR)
enccfg
.
rc_2pass_vbr_bias_pct
=
round
(
avctx
->
qcompress
*
100
);
enccfg
.
rc_2pass_vbr_bias_pct
=
round
(
avctx
->
qcompress
*
100
);
if
(
avctx
->
bit_rate
)
if
(
avctx
->
bit_rate
)
enccfg
.
rc_2pass_vbr_minsection_pct
=
enccfg
.
rc_2pass_vbr_minsection_pct
=
avctx
->
rc_min_rate
*
100LL
/
avctx
->
bit_rate
;
avctx
->
rc_min_rate
*
100LL
/
avctx
->
bit_rate
;
if
(
avctx
->
rc_max_rate
)
if
(
avctx
->
rc_max_rate
)
enccfg
.
rc_2pass_vbr_maxsection_pct
=
enccfg
.
rc_2pass_vbr_maxsection_pct
=
...
@@ -490,8 +491,8 @@ static av_cold int vpx_init(AVCodecContext *avctx,
...
@@ -490,8 +491,8 @@ static av_cold int vpx_init(AVCodecContext *avctx,
/* 0-3: For non-zero values the encoder increasingly optimizes for reduced
/* 0-3: For non-zero values the encoder increasingly optimizes for reduced
complexity playback on low powered devices at the expense of encode
complexity playback on low powered devices at the expense of encode
quality. */
quality. */
if
(
avctx
->
profile
!=
FF_PROFILE_UNKNOWN
)
if
(
avctx
->
profile
!=
FF_PROFILE_UNKNOWN
)
enccfg
.
g_profile
=
avctx
->
profile
;
enccfg
.
g_profile
=
avctx
->
profile
;
enccfg
.
g_error_resilient
=
ctx
->
error_resilient
||
ctx
->
flags
&
VP8F_ERROR_RESILIENT
;
enccfg
.
g_error_resilient
=
ctx
->
error_resilient
||
ctx
->
flags
&
VP8F_ERROR_RESILIENT
;
...
@@ -611,8 +612,7 @@ static inline void cx_pktcpy(struct FrameListData *dst,
...
@@ -611,8 +612,7 @@ static inline void cx_pktcpy(struct FrameListData *dst,
if
(
src_alpha
)
{
if
(
src_alpha
)
{
dst
->
buf_alpha
=
src_alpha
->
data
.
frame
.
buf
;
dst
->
buf_alpha
=
src_alpha
->
data
.
frame
.
buf
;
dst
->
sz_alpha
=
src_alpha
->
data
.
frame
.
sz
;
dst
->
sz_alpha
=
src_alpha
->
data
.
frame
.
sz
;
}
}
else
{
else
{
dst
->
buf_alpha
=
NULL
;
dst
->
buf_alpha
=
NULL
;
dst
->
sz_alpha
=
0
;
dst
->
sz_alpha
=
0
;
}
}
...
@@ -703,8 +703,8 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out,
...
@@ -703,8 +703,8 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out,
/* consume all available output from the encoder before returning. buffers
/* consume all available output from the encoder before returning. buffers
are only good through the next vpx_codec call */
are only good through the next vpx_codec call */
while
((
pkt
=
vpx_codec_get_cx_data
(
&
ctx
->
encoder
,
&
iter
))
&&
while
((
pkt
=
vpx_codec_get_cx_data
(
&
ctx
->
encoder
,
&
iter
))
&&
(
!
ctx
->
is_alpha
||
(
!
ctx
->
is_alpha
||
(
ctx
->
is_alpha
&&
(
pkt_alpha
=
vpx_codec_get_cx_data
(
&
ctx
->
encoder_alpha
,
&
iter_alpha
)))))
{
(
ctx
->
is_alpha
&&
(
pkt_alpha
=
vpx_codec_get_cx_data
(
&
ctx
->
encoder_alpha
,
&
iter_alpha
)))))
{
switch
(
pkt
->
kind
)
{
switch
(
pkt
->
kind
)
{
case
VPX_CODEC_CX_FRAME_PKT
:
case
VPX_CODEC_CX_FRAME_PKT
:
if
(
!
size
)
{
if
(
!
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