Commit 2a31bf2a authored by James Almer's avatar James Almer

avcodec/libdav1d: move the pix_fmt enum array up in the file

This is in preparation for the following commit.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent dcf64b59
...@@ -37,6 +37,13 @@ typedef struct Libdav1dContext { ...@@ -37,6 +37,13 @@ typedef struct Libdav1dContext {
int apply_grain; int apply_grain;
} Libdav1dContext; } Libdav1dContext;
static const enum AVPixelFormat pix_fmt[][3] = {
[DAV1D_PIXEL_LAYOUT_I400] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12 },
[DAV1D_PIXEL_LAYOUT_I420] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P12 },
[DAV1D_PIXEL_LAYOUT_I422] = { AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P12 },
[DAV1D_PIXEL_LAYOUT_I444] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV444P12 },
};
static void libdav1d_log_callback(void *opaque, const char *fmt, va_list vl) static void libdav1d_log_callback(void *opaque, const char *fmt, va_list vl)
{ {
AVCodecContext *c = opaque; AVCodecContext *c = opaque;
...@@ -87,13 +94,6 @@ static void libdav1d_frame_free(void *opaque, uint8_t *data) { ...@@ -87,13 +94,6 @@ static void libdav1d_frame_free(void *opaque, uint8_t *data) {
av_free(p); av_free(p);
} }
static const enum AVPixelFormat pix_fmt[][3] = {
[DAV1D_PIXEL_LAYOUT_I400] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12 },
[DAV1D_PIXEL_LAYOUT_I420] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV420P12 },
[DAV1D_PIXEL_LAYOUT_I422] = { AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV422P12 },
[DAV1D_PIXEL_LAYOUT_I444] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV444P12 },
};
static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
{ {
Libdav1dContext *dav1d = c->priv_data; Libdav1dContext *dav1d = c->priv_data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment