diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-09 00:43:52 +0300 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-09 00:43:52 +0300 |
commit | b975aeec02e4518a4e5f2996cf51d113e42e1727 (patch) | |
tree | 2a2db1597eb4a20f4ad9f7be56d3992bbcfb8448 /libavcodec/vaapi_encode_h26x.h | |
parent | 508957fd0fc398271f3ec87cde63ba4533678bf9 (diff) | |
parent | 2c62fcdf5d617791a653d7957d449f75569eede0 (diff) |
Merge commit '2c62fcdf5d617791a653d7957d449f75569eede0'
* commit '2c62fcdf5d617791a653d7957d449f75569eede0':
lavc: VAAPI H.264 encoder
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/vaapi_encode_h26x.h')
-rw-r--r-- | libavcodec/vaapi_encode_h26x.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libavcodec/vaapi_encode_h26x.h b/libavcodec/vaapi_encode_h26x.h new file mode 100644 index 0000000000..f8c6e13adb --- /dev/null +++ b/libavcodec/vaapi_encode_h26x.h @@ -0,0 +1,45 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VAAPI_ENCODE_H26X_H +#define AVCODEC_VAAPI_ENCODE_H26X_H + +#include <stddef.h> +#include <stdint.h> + +#include "golomb.h" +#include "put_bits.h" + + +// Debug code may be interested in the name of the syntax element being +// for tracing purposes. Here, it is just discarded. + +#define write_u(pbc, width, value, name) put_bits(pbc, width, value) +#define write_ue(pbc, value, name) set_ue_golomb(pbc, value) +#define write_se(pbc, value, name) set_se_golomb(pbc, value) + +#define u(width, ...) write_u(pbc, width, __VA_ARGS__) +#define ue(...) write_ue(pbc, __VA_ARGS__) +#define se(...) write_se(pbc, __VA_ARGS__) + + +// Copy from src to dst, applying emulation prevention. +int ff_vaapi_encode_h26x_nal_unit_to_byte_stream(uint8_t *dst, size_t *dst_len, + uint8_t *src, size_t src_len); + +#endif /* AVCODEC_VAAPI_ENCODE_H26X_H */ |