On Sun, 19 Feb 2017 18:46:39 +0000
Mark Thompson <[email protected]> wrote:
> ---
> doc/APIchanges | 3 +++
> libavutil/pixdesc.c | 4 ++++
> libavutil/pixfmt.h | 7 +++++++
> libavutil/version.h | 2 +-
> 4 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 1e84c3803..253454358 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -13,6 +13,9 @@ libavutil: 2015-08-28
>
> API changes, most recent first:
>
> +2017-xx-xx - xxxxxxx - lavu 55.33.0 - pixfmt.h
> + Add AV_PIX_FMT_OPENCL.
> +
> 2017-02-xx - xxxxxxx - lavc - avcodec.h
> The vdpau hwaccel now works with the AVCodecContext.hw_frames_ctx and
> AVCodecContext.hw_device_ctx APIs.
> diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
> index d69eeea9d..6a2742f11 100644
> --- a/libavutil/pixdesc.c
> +++ b/libavutil/pixdesc.c
> @@ -1759,6 +1759,10 @@ static const AVPixFmtDescriptor
> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
> .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR |
> AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA,
> },
> + [AV_PIX_FMT_OPENCL] = {
> + .name = "opencl",
> + .flags = AV_PIX_FMT_FLAG_HWACCEL,
> + },
(I wonder if we have any rules on whether log2_chroma_w/h are supposed
to be set for hwaccel formats, but it's already inconsistent, so no
matter.)
> };
> #if FF_API_PLUS1_MINUS1
> FF_ENABLE_DEPRECATION_WARNINGS
> diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
> index 41498ccef..ae1e2349b 100644
> --- a/libavutil/pixfmt.h
> +++ b/libavutil/pixfmt.h
> @@ -248,6 +248,13 @@ enum AVPixelFormat {
> AV_PIX_FMT_GRAY12BE, ///< Y , 12bpp, big-endian
> AV_PIX_FMT_GRAY12LE, ///< Y , 12bpp, little-endian
>
> + /**
> + * Hardware surfaces used in OpenCL.
> + * data[i] contain 2D image objects (typed in C as cl_mem, used
> + * in OpenCL as image2d_t) for each plane of the surface.
> + */
> + AV_PIX_FMT_OPENCL,
That's interesting. Normally hwaccel pixfmts have data only in data[3].
I wonder how AVFrame.bufs is supposed to be set here?
> +
> AV_PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if
> you want to link with shared libav* because the number of formats might
> differ between versions
> };
>
> diff --git a/libavutil/version.h b/libavutil/version.h
> index 5dbc57cc1..0f2b684fa 100644
> --- a/libavutil/version.h
> +++ b/libavutil/version.h
> @@ -54,7 +54,7 @@
> */
>
> #define LIBAVUTIL_VERSION_MAJOR 55
> -#define LIBAVUTIL_VERSION_MINOR 32
> +#define LIBAVUTIL_VERSION_MINOR 33
> #define LIBAVUTIL_VERSION_MICRO 0
>
> #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel