43 uint32_t
flags, in_format;
48 in_format = UTVF_YV12;
56 in_format = UTVF_YUYV;
77 #if FF_API_PRIVATE_OPT
85 if (utv->
pred != 0 && utv->
pred != 2) {
125 utv->
codec = CCodec::CreateInstance(UNFCC(avctx->
codec_tag),
"libavcodec");
129 CBGROSSWIDTH_WINDOWS);
135 CBGROSSWIDTH_WINDOWS);
139 utv->
codec->SetState(&flags,
sizeof(flags));
145 const AVFrame *pic,
int *got_packet)
149 int ret, rgb_size, i;
166 for (i = 0; i <
h; i++) {
170 for (i = 0; i < h / 2; i++) {
178 for (i = 0; i <
h; i++)
179 memcpy(utv->
buffer + i * (w << 1),
186 for (i = 0; i <
h; i++)
187 memcpy(utv->
buffer + (h - i - 1) * w * rgb_size,
223 utv->
codec->EncodeEnd();
224 CCodec::DeleteInstance(utv->
codec);
229 #define OFFSET(x) offsetof(UtVideoContext, x)
230 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
#define LIBAVUTIL_VERSION_INT
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
#define AV_CODEC_CAP_AUTO_THREADS
Codec supports avctx->thread_count == 0 (auto).
static av_cold int utvideo_encode_init(AVCodecContext *avctx)
#define AV_CODEC_CAP_INTRA_ONLY
Codec is intra only.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static const AVClass utvideo_class
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align)
Return the size in bytes of the amount of data required to store an image with the given parameters...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
simple assert() macros that are a bit more flexible than ISO C assert().
int flags
A combination of AV_PKT_FLAG values.
int width
picture width / height.
Known FOURCCs: 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA), 'ULH0' (YCbCr 4:2:0 BT.709), 'ULH2' (YCbCr 4:2:2 BT.709)
packed RGB 8:8:8, 24bpp, BGRBGR...
static const AVOption options[]
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
static const float pred[4]
Libavcodec external API header.
attribute_deprecated int prediction_method
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Describe the class of an AVClass context structure.
enum AVColorSpace colorspace
YUV colorspace type.
static av_cold int utvideo_encode_close(AVCodecContext *avctx)
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size)
Check AVPacket size and/or allocate data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FF_DISABLE_DEPRECATION_WARNINGS
common internal api header.
#define AV_CODEC_CAP_LOSSLESS
Codec is lossless.
#define FF_ENABLE_DEPRECATION_WARNINGS
#define MKTAG(a, b, c, d)
AVPixelFormat
Pixel format.
This structure stores compressed data.
AVCodec ff_libutvideo_encoder
#define UTVF_NFCC_BGRA_BU