--- libavcodec/libvpxdec.c | 28 ++++++++++++++-------------- libavcodec/libvpxenc.c | 40 ++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c index 804875f..50f9660 100644 --- a/libavcodec/libvpxdec.c +++ b/libavcodec/libvpxdec.c @@ -20,7 +20,7 @@ /** * @file - * VP8 decoder support via libvpx + * VPX decoding support via libvpx */ #define VPX_CODEC_DISABLE_COMPAT 1 @@ -33,14 +33,14 @@ #include "internal.h" #include "libvpx.h" -typedef struct VP8DecoderContext { +typedef struct VPXDecodeContext { struct vpx_codec_ctx decoder; -} VP8Context; +} VPXDecodeContext; static av_cold int vpx_init(AVCodecContext *avctx, const struct vpx_codec_iface *iface) { - VP8Context *ctx = avctx->priv_data; + VPXDecodeContext *ctx = avctx->priv_data; struct vpx_codec_dec_cfg deccfg = { /* token partitions+1 would be a decent choice */ .threads = FFMIN(avctx->thread_count, 16) @@ -59,10 +59,10 @@ static av_cold int vpx_init(AVCodecContext *avctx, return 0; } -static int vp8_decode(AVCodecContext *avctx, +static int vpx_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { - VP8Context *ctx = avctx->priv_data; + VPXDecodeContext *ctx = avctx->priv_data; AVFrame *picture = data; const void *iter = NULL; struct vpx_image *img; @@ -112,9 +112,9 @@ static int vp8_decode(AVCodecContext *avctx, return avpkt->size; } -static av_cold int vp8_free(AVCodecContext *avctx) +static av_cold int vpx_free(AVCodecContext *avctx) { - VP8Context *ctx = avctx->priv_data; + VPXDecodeContext *ctx = avctx->priv_data; vpx_codec_destroy(&ctx->decoder); return 0; } @@ -130,10 +130,10 @@ AVCodec ff_libvpx_vp8_decoder = { .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_VP8, - .priv_data_size = sizeof(VP8Context), + .priv_data_size = sizeof(VPXDecodeContext), .init = vp8_init, - .close = vp8_free, - .decode = vp8_decode, + .close = vpx_free, + .decode = vpx_decode, .capabilities = AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_DR1, }; #endif /* CONFIG_LIBVPX_VP8_DECODER */ @@ -149,10 +149,10 @@ AVCodec ff_libvpx_vp9_decoder = { .long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_VP9, - .priv_data_size = sizeof(VP8Context), + .priv_data_size = sizeof(VPXDecodeContext), .init = vp9_init, - .close = vp8_free, - .decode = vp8_decode, + .close = vpx_free, + .decode = vpx_decode, .capabilities = AV_CODEC_CAP_AUTO_THREADS, }; #endif /* CONFIG_LIBVPX_VP9_DECODER */ diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 754a4c5..03c27c5 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -20,7 +20,7 @@ /** * @file - * VP8 encoder support via libvpx + * VPX encoding support via libvpx */ #define VPX_DISABLE_CTRL_TYPECHECKS 1 @@ -51,7 +51,7 @@ struct FrameListData { struct FrameListData *next; }; -typedef struct VP8EncoderContext { +typedef struct VPXEncodeContext { AVClass *class; struct vpx_codec_ctx encoder; struct vpx_image rawimg; @@ -69,7 +69,7 @@ typedef struct VP8EncoderContext { int static_thresh; int drop_threshold; int noise_sensitivity; -} VP8Context; +} VPXEncodeContext; /** String mappings for enum vp8e_enc_control_id */ static const char *const ctlidstr[] = { @@ -86,7 +86,7 @@ static const char *const ctlidstr[] = { static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc) { - VP8Context *ctx = avctx->priv_data; + VPXEncodeContext *ctx = avctx->priv_data; const char *error = vpx_codec_error(&ctx->encoder); const char *detail = vpx_codec_error_detail(&ctx->encoder); @@ -180,7 +180,7 @@ static av_cold void free_frame_list(struct FrameListData *list) static av_cold int codecctl_int(AVCodecContext *avctx, enum vp8e_enc_control_id id, int val) { - VP8Context *ctx = avctx->priv_data; + VPXEncodeContext *ctx = avctx->priv_data; char buf[80]; int width = -30; int res; @@ -198,9 +198,9 @@ static av_cold int codecctl_int(AVCodecContext *avctx, return res == VPX_CODEC_OK ? 0 : AVERROR(EINVAL); } -static av_cold int vp8_free(AVCodecContext *avctx) +static av_cold int vpx_free(AVCodecContext *avctx) { - VP8Context *ctx = avctx->priv_data; + VPXEncodeContext *ctx = avctx->priv_data; vpx_codec_destroy(&ctx->encoder); av_freep(&ctx->twopass_stats.buf); @@ -212,7 +212,7 @@ static av_cold int vp8_free(AVCodecContext *avctx) static av_cold int vpx_init(AVCodecContext *avctx, const struct vpx_codec_iface *iface) { - VP8Context *ctx = avctx->priv_data; + VPXEncodeContext *ctx = avctx->priv_data; struct vpx_codec_enc_cfg enccfg = { 0 }; AVCPBProperties *cpb_props; int res; @@ -456,7 +456,7 @@ FF_ENABLE_DEPRECATION_WARNINGS */ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out) { - VP8Context *ctx = avctx->priv_data; + VPXEncodeContext *ctx = avctx->priv_data; const struct vpx_codec_cx_pkt *pkt; const void *iter = NULL; int size = 0; @@ -534,10 +534,10 @@ static int queue_frames(AVCodecContext *avctx, AVPacket *pkt_out) return size; } -static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt, +static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) { - VP8Context *ctx = avctx->priv_data; + VPXEncodeContext *ctx = avctx->priv_data; struct vpx_image *rawimg = NULL; int64_t timestamp = 0; int res, coded_size; @@ -591,7 +591,7 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt, return 0; } -#define OFFSET(x) offsetof(VP8Context, x) +#define OFFSET(x) offsetof(VPXEncodeContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { { "cpu-used", "Quality/Speed ratio modifier", OFFSET(cpu_used), AV_OPT_TYPE_INT, {.i64 = 1}, INT_MIN, INT_MAX, VE}, @@ -617,9 +617,9 @@ static const AVOption options[] = { "though earlier partitions have been lost. Note that intra predicition" " is still done over the partition boundary.", 0, AV_OPT_TYPE_CONST, {.i64 = VPX_ERROR_RESILIENT_PARTITIONS}, 0, 0, VE, "er"}, #endif - { "crf", "Select the quality for constant quality mode", offsetof(VP8Context, crf), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 63, VE }, + { "crf", "Select the quality for constant quality mode", offsetof(VPXEncodeContext, crf), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 63, VE }, { "static-thresh", "A change threshold on blocks below which they will be skipped by the encoder", OFFSET(static_thresh), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, - { "drop-threshold", "Frame drop threshold", offsetof(VP8Context, drop_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, VE }, + { "drop-threshold", "Frame drop threshold", offsetof(VPXEncodeContext, drop_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, VE }, { "noise-sensitivity", "Noise sensitivity", OFFSET(noise_sensitivity), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 4, VE}, { NULL } }; @@ -650,10 +650,10 @@ AVCodec ff_libvpx_vp8_encoder = { .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_VP8, - .priv_data_size = sizeof(VP8Context), + .priv_data_size = sizeof(VPXEncodeContext), .init = vp8_init, - .encode2 = vp8_encode, - .close = vp8_free, + .encode2 = vpx_encode, + .close = vpx_free, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, .priv_class = &vpx_class, @@ -680,10 +680,10 @@ AVCodec ff_libvpx_vp9_encoder = { .long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_VP9, - .priv_data_size = sizeof(VP8Context), + .priv_data_size = sizeof(VPXEncodeContext), .init = vp9_init, - .encode2 = vp8_encode, - .close = vp8_free, + .encode2 = vpx_encode, + .close = vpx_free, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, -- 2.7.3 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel