31 #define BYTES_PER_PIXEL 1
32 #define RENAME(a) a ## _ ## 8
36 #undef BYTES_PER_PIXEL
41 #define BYTES_PER_PIXEL 2
42 #define RENAME(a) a ## _ ## 10
46 #undef BYTES_PER_PIXEL
57 for (
i = 0;
i <
width - 11;
i += 12) {
70 const uint16_t *v,
uint8_t *dst,
88 s->sample_factor_8 = 2;
89 s->sample_factor_10 = 1;
99 if (avctx->
width & 1) {
104 #if FF_API_CODED_FRAME
119 const AVFrame *pic,
int *got_packet)
121 int aligned_width = ((avctx->
width + 47) / 48) * 48;
122 int stride = aligned_width * 8 / 3;
135 v210_enc_10(avctx, dst, pic);
137 v210_enc_8(avctx, dst, pic);
140 if (side_data && side_data->
size) {
144 memcpy(buf, side_data->
data, side_data->
size);
148 if (side_data && side_data->
size) {
152 memcpy(buf, side_data->
data, side_data->
size);
static double val(void *priv, double ch)
Libavcodec external API header.
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, buffer_size_t size)
static av_cold int init(AVCodecContext *avctx)
#define u(width, name, range_min, range_max)
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size)
Check AVPacket size and/or allocate data.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
@ AV_PKT_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
@ AV_PKT_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
@ AV_FRAME_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AV_PICTURE_TYPE_I
Intra.
int64_t ff_guess_coded_bitrate(AVCodecContext *avctx)
Get an estimated video bitrate based on frame size, frame rate and coded bits per pixel.
av_cold void ff_v210enc_init(V210EncContext *s)
static av_cold int encode_init(AVCodecContext *avctx)
static void v210_planar_pack_10_c(const uint16_t *y, const uint16_t *u, const uint16_t *v, uint8_t *dst, ptrdiff_t width)
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet)
static void v210_planar_pack_8_c(const uint8_t *y, const uint8_t *u, const uint8_t *v, uint8_t *dst, ptrdiff_t width)
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define FF_DISABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
static enum AVPixelFormat pix_fmts[]
#define AV_PIX_FMT_YUV422P10
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
main external API structure.
int width
picture width / height.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
attribute_deprecated AVFrame * coded_frame
the picture in the bitstream
int64_t bit_rate
the average bitrate
const char * name
Name of the codec implementation.
Structure to hold side data for an AVFrame.
This structure describes decoded (raw) audio or video data.
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
enum AVPictureType pict_type
Picture type of the frame.
This structure stores compressed data.
int flags
A combination of AV_PKT_FLAG values.
#define WRITE_PIXELS(a, b, c, depth)
void ff_v210enc_init_x86(V210EncContext *s)