Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ffmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Mira
ffmpeg
Commits
96e84005
Commit
96e84005
authored
7 years ago
by
Luca Barbato
Committed by
James Almer
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
x264: Support version 153
It has native simultaneus 8 and 10 bit support. (cherry picked from commit
c6558e88
)
parent
54897d74
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/libx264.c
+29
-0
29 additions, 0 deletions
libavcodec/libx264.c
with
29 additions
and
0 deletions
libavcodec/libx264.c
+
29
−
0
View file @
96e84005
...
...
@@ -279,7 +279,11 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
x264_picture_init
(
&
x4
->
pic
);
x4
->
pic
.
img
.
i_csp
=
x4
->
params
.
i_csp
;
#if X264_BUILD >= 153
if
(
x4
->
params
.
i_bitdepth
>
8
)
#else
if
(
x264_bit_depth
>
8
)
#endif
x4
->
pic
.
img
.
i_csp
|=
X264_CSP_HIGH_DEPTH
;
x4
->
pic
.
img
.
i_plane
=
avfmt2_num_planes
(
ctx
->
pix_fmt
);
...
...
@@ -490,6 +494,9 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4
->
params
.
p_log_private
=
avctx
;
x4
->
params
.
i_log_level
=
X264_LOG_DEBUG
;
x4
->
params
.
i_csp
=
convert_pix_fmt
(
avctx
->
pix_fmt
);
#if X264_BUILD >= 153
x4
->
params
.
i_bitdepth
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
)
->
comp
[
0
].
depth
;
#endif
PARSE_X264_OPT
(
"weightp"
,
wpredp
);
...
...
@@ -878,6 +885,24 @@ static const enum AVPixelFormat pix_fmts_10bit[] = {
AV_PIX_FMT_NV20
,
AV_PIX_FMT_NONE
};
static
const
enum
AVPixelFormat
pix_fmts_all
[]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUVJ420P
,
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUVJ422P
,
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUVJ444P
,
AV_PIX_FMT_NV12
,
AV_PIX_FMT_NV16
,
#ifdef X264_CSP_NV21
AV_PIX_FMT_NV21
,
#endif
AV_PIX_FMT_YUV420P10
,
AV_PIX_FMT_YUV422P10
,
AV_PIX_FMT_YUV444P10
,
AV_PIX_FMT_NV20
,
AV_PIX_FMT_NONE
};
#if CONFIG_LIBX264RGB_ENCODER
static
const
enum
AVPixelFormat
pix_fmts_8bit_rgb
[]
=
{
AV_PIX_FMT_BGR0
,
...
...
@@ -889,12 +914,16 @@ static const enum AVPixelFormat pix_fmts_8bit_rgb[] = {
static
av_cold
void
X264_init_static
(
AVCodec
*
codec
)
{
#if X264_BUILD < 153
if
(
x264_bit_depth
==
8
)
codec
->
pix_fmts
=
pix_fmts_8bit
;
else
if
(
x264_bit_depth
==
9
)
codec
->
pix_fmts
=
pix_fmts_9bit
;
else
if
(
x264_bit_depth
==
10
)
codec
->
pix_fmts
=
pix_fmts_10bit
;
#else
codec
->
pix_fmts
=
pix_fmts_all
;
#endif
}
#define OFFSET(x) offsetof(X264Context, x)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment