Steve Borho
b012bd5068
libavcodec/x265: detect csps in libx265_encode_init_csp()
...
Without this change, if you link with an 8bit libx265 and try to specify
a 10bit input color space via:
ffmpeg -i in.mov -c:v libx265 -pix_fmt yuv420p10le out.mp4
It will error with:
Incompatible pixel format 'yuv420p10le' for codec 'libx265',
auto-selecting format 'yuv420p'
With this fix, it will learn if a 10bit libx265 is available at startup,
and thus allow 10bit input color spaces.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-05-18 15:27:51 -03:00
Gopu Govindaswamy
94c20de429
avcodec/libx265: use x265 Multi-library Interface to query the API
...
ffmpeg can now use the x265 multi-library interface to make a runtime
selection between a number of libx265 libraries (perhaps 8bpp and 16bpp).
ffmpeg will link to one build of libx265 (statically or
dynamically) and this linked version of libx265 will support one
bit-depth (8 or 10 bits). At runtime, ffmpeg now has the option to request the
encoder to use a different bit depth(8 or 10). If the requested bitdepth
is zero, or if it matches the bitdepth of the system default libx265 (the
currently linked library), then this library will be used for encode.
If ffmpeg requests a different bit-depth, the linked libx265 will attempt
to dynamically bind a shared library with the requested bit-depth from the install
location (default or user-specified).
new x265 API:
const x265_api* api = x265_api_get(int bitDepth);
x265_api - holds the libx265 public API functions
bitDepth - requested API for 8bpp or 16bpp
note: Use 0 to indicate native bit depth of the linked libx265 and
x265_api_get(0) is guaranteed to return a non-null pointer
Signed-off-by: Gopu Govindaswamy <gopu@multicorewareinc.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-05-11 16:15:23 +01:00
Michael Niedermayer
1caff5731d
Merge commit '04070dbca0688ab1e24528ce5c135254a9a79c47'
...
* commit '04070dbca0688ab1e24528ce5c135254a9a79c47':
libx265: Fix 'braces around scalar initializer' warning
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 21:46:52 +02:00
Vittorio Giovara
04070dbca0
libx265: Fix 'braces around scalar initializer' warning
...
x265 Reordered the x265_picture fields in the commit
51b1518de2 (diff-945b5354d8767dfac13334f2d22cf58fR107)
Now the first field is an integer and not an array.
2015-05-06 14:53:29 +01:00
Michael Niedermayer
0842df2619
Merge commit 'ec89f35e3e5eb9ec5221266e801efeee7ecab4df'
...
* commit 'ec89f35e3e5eb9ec5221266e801efeee7ecab4df':
x265: Map color parameters
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 11:57:38 +02:00
Luca Barbato
ec89f35e3e
x265: Map color parameters
2015-04-15 09:48:48 +02:00
James Almer
bbdb50d7a8
libx265: print supported presets and tunes on error
...
Based on code from libavcodec/libx264.c
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-04-11 11:13:28 -04:00
James Almer
61090db29a
avcodec/libx265: print supported presets and tunes on error
...
Based on code from libavcodec/libx264.c
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-04-10 16:47:29 -03:00
Michael Niedermayer
31048d48b0
avcodec/libx265: export chosen picture types
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-04-05 12:32:07 -04:00
Michael Niedermayer
2ddedfd39c
avcodec/libx265: export choosen picture types
...
Fixes part of ticket 4285
Reviewed-by Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-31 20:21:10 +02:00
Derek Buitenhuis
8b96e8dd28
libx265: Add crf private option
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-02-18 10:21:56 -05:00
Derek Buitenhuis
b920db6731
libx265: Reduce the scope of some variables
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-02-18 10:21:54 -05:00
Derek Buitenhuis
d617e77cec
libx265: Add crf private option
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-02-18 10:18:12 -05:00
Derek Buitenhuis
2de887e45b
libx265: Reduce the scope of some variables
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-02-18 10:16:50 -05:00
Derek Buitenhuis
41e983f1a6
libx265: Pass through user-set frame type
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-01-22 16:30:27 +00:00
Derek Buitenhuis
6341ab0ad3
libx265: Pass through user-set frame type
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-01-22 16:29:30 +00:00
Michael Niedermayer
d10d1b8655
libx265: enable psnr reporting when requested by the user
...
This is similar to what is done in libx264.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-10-01 14:31:48 +01:00
Michael Niedermayer
3956b12fde
avcodec/libx265: enable psnr reporting when requested by the user
...
This is similar to what is done in libx264.c
Fixes Ticket3567
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 04:14:43 +02:00
Michael Niedermayer
eacf42dd50
Merge commit '4912b634b517c8acfc476c5d47f10be83fe7e18b'
...
* commit '4912b634b517c8acfc476c5d47f10be83fe7e18b':
x265: Use the encoder defaults
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-03 12:10:09 +02:00
Luca Barbato
4912b634b5
x265: Use the encoder defaults
...
Reset the settings as it is done for x264.
2014-09-03 02:14:17 +02:00
Derek Buitenhuis
ceada893be
libx265: Remove unneeded bit depth check
...
This is no longer needed since the version bump.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-06-12 16:45:02 +01:00
Derek Buitenhuis
61a344916d
libx265: Add 4:2:2 support
...
It is also not final yet, so require -strict experimental.
Requires a bump to version 17.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-06-12 16:45:02 +01:00
Derek Buitenhuis
180e6b4806
libx265: Actually use X265_API_IMPORTS
...
It obvously needs to be above the include statement.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-06-12 16:45:02 +01:00
Derek Buitenhuis
7ed89addb7
libx265: Remove unneeded bit depth check
...
This is no longer needed since the version bump.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-06-12 16:43:31 +01:00
Derek Buitenhuis
6ee95af8a1
libx265: Add 4:2:2 support
...
It is also not final yet, so require -strict experimental.
Requires a bump to version 17.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-06-12 13:53:34 +01:00
Derek Buitenhuis
4e9b46b056
libx265: Actually use X265_API_IMPORTS
...
It obvously needs to be above the include statement.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-06-12 13:53:34 +01:00
Derek Buitenhuis
cdd21f1f03
libx265: Only set the SAR if it is valid
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-04-10 16:49:03 +01:00
Derek Buitenhuis
fcc43e02d3
libx265: Use 16-bit SAR
...
The spec says it is 16 bits.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-04-10 16:49:03 +01:00
Derek Buitenhuis
25fbfeed98
libx265: Only set the SAR if it is valid
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-04-10 13:28:59 +01:00
Derek Buitenhuis
cd0ac6f6e5
libx265: Use 16-bit SAR
...
The spec says it is 16 bits.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-04-10 13:28:55 +01:00
Derek Buitenhuis
8945dcbb52
libx265: Use x265_param_parse to set the SAR
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-04-10 13:08:01 +01:00
Derek Buitenhuis
4a2226451e
libx265: Use x265_param_parse to set the SAR
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-04-10 13:06:45 +01:00
Marcus Gustafsson
c042cbc3a6
libx265: Use the repeat headers flag when not using global headers
...
This allows proper muxing and seeking in things like MPEG-TS, by
placing headers by random access points.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-03-31 16:24:05 +01:00
Marcus Gustafsson
1b28d9b357
libx265: Use the repeat headers flag when not using global headers
...
This allows proper muxing and seeking in things like MPEG-TS, by
placing headers by random access points.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-03-31 13:13:46 +01:00
Derek Buitenhuis
ecb5b9c098
libx265: Only use one memcpy for headers
...
They're guaranteed by the x265 API to be contiguous in memory.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-03-24 15:28:20 +00:00
Derek Buitenhuis
206d5330f6
libx265: Simple cosmetic fix
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-03-24 15:28:11 +00:00
Derek Buitenhuis
21a561176e
libx265: Only use one memcpy for headers
...
They're guaranteed by the x265 API to be contiguous in memory.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-03-24 15:27:41 +00:00
Michael Niedermayer
60728e8bab
libx265: Write global extradata when requested
...
Matroska, MP4, and other containers require it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-03-24 15:27:41 +00:00
Michael Niedermayer
dded5ed9c5
avcodec/libx265: fill headers in extradata
...
Fixes Ticket3457
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-14 04:26:24 +01:00
Derek Buitenhuis
d67dbfa7c1
libx265: Support API version 9
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-03-06 20:21:27 +00:00
sfan5
69ead9af75
libx265: Use ctx->vui. instead of ctx-> for some options A recent change in libx265 moved some options such as sar_width into a 'vui' struct.
...
Signed-off-by: sfan5 <sfan5@live.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-06 17:07:46 +01:00
Derek Buitenhuis
6d18154f61
libx265: Use proper error code
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:10:23 -05:00
Derek Buitenhuis
87769d6c8f
libx265: Properly handled dynamic linking with MSVC
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:10:23 -05:00
Derek Buitenhuis
73ee4cf307
libx265: Support SAR
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:10:23 -05:00
Derek Buitenhuis
d102925a6d
libx265: Support 4:4:4
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:10:17 -05:00
Derek Buitenhuis
d373647194
libx265: Update API usage
...
Framerate is now a sane rational instead of an integer, and
inputDepth is changed to what it actually is.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:09:30 -05:00
Derek Buitenhuis
8aca00cc2b
libx265: Properly handled dynamic linking with MSVC
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:07:33 -05:00
Derek Buitenhuis
0f7fa48cf1
libx265: Support SAR
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:07:33 -05:00
Derek Buitenhuis
2142b2efcd
libx265: Support 4:4:4
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:06:59 -05:00
Derek Buitenhuis
d00a504b24
libx265: Update API usage
...
Framerate is now a sane rational instead of an integer, and
inputDepth is changed to what it actually is.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 15:50:04 +00:00