|
|
|
@ -33,6 +33,11 @@ static av_cold int v408_encode_init(AVCodecContext *avctx) |
|
|
|
|
avctx->bits_per_coded_sample = 32; |
|
|
|
|
avctx->bit_rate = ff_guess_coded_bitrate(avctx); |
|
|
|
|
|
|
|
|
|
#if FF_API_AYUV_CODECID |
|
|
|
|
if (avctx->codec_id == AV_CODEC_ID_AYUV) |
|
|
|
|
av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated and will be removed.\n"); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -55,12 +60,15 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
|
|
|
|
|
|
|
|
|
for (i = 0; i < avctx->height; i++) { |
|
|
|
|
for (j = 0; j < avctx->width; j++) { |
|
|
|
|
#if FF_API_AYUV_CODECID |
|
|
|
|
if (avctx->codec_id==AV_CODEC_ID_AYUV) { |
|
|
|
|
*dst++ = v[j]; |
|
|
|
|
*dst++ = u[j]; |
|
|
|
|
*dst++ = y[j]; |
|
|
|
|
*dst++ = a[j]; |
|
|
|
|
} else { |
|
|
|
|
} else |
|
|
|
|
#endif |
|
|
|
|
{ |
|
|
|
|
*dst++ = u[j]; |
|
|
|
|
*dst++ = y[j]; |
|
|
|
|
*dst++ = v[j]; |
|
|
|
@ -79,6 +87,7 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
|
|
|
|
|
|
|
|
|
static const enum AVPixelFormat pix_fmt[] = { AV_PIX_FMT_YUVA444P, AV_PIX_FMT_NONE }; |
|
|
|
|
|
|
|
|
|
#if FF_API_AYUV_CODECID |
|
|
|
|
#if CONFIG_AYUV_ENCODER |
|
|
|
|
const FFCodec ff_ayuv_encoder = { |
|
|
|
|
.p.name = "ayuv", |
|
|
|
@ -91,6 +100,7 @@ const FFCodec ff_ayuv_encoder = { |
|
|
|
|
.p.pix_fmts = pix_fmt, |
|
|
|
|
}; |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
#if CONFIG_V408_ENCODER |
|
|
|
|
const FFCodec ff_v408_encoder = { |
|
|
|
|
.p.name = "v408", |
|
|
|
|