extern uint8_t ff_h263_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
+extern const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[];
+
int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code);
av_const int ff_h263_aspect_to_info(AVRational aspect);
return (ret && (avctx->err_recognition & AV_EF_EXPLODE))?ret:get_consumed_bytes(s, buf_size);
}
+const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_VAAPI
+ AV_PIX_FMT_VAAPI_VLD,
+#endif
+#if CONFIG_VDPAU
+ AV_PIX_FMT_VDPAU,
+#endif
+ AV_PIX_FMT_YUV420P,
+ AV_PIX_FMT_NONE
+};
+
AVCodec ff_h263_decoder = {
.name = "h263",
.type = AVMEDIA_TYPE_VIDEO,
CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
.flush = ff_mpeg_flush,
.long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
- .pix_fmts = ff_hwaccel_pixfmt_list_420,
+ .pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
};
7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10,
};
+static const enum AVPixelFormat h264_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_H264_DXVA2_HWACCEL
+ AV_PIX_FMT_DXVA2_VLD,
+#endif
+#if CONFIG_H264_VAAPI_HWACCEL
+ AV_PIX_FMT_VAAPI_VLD,
+#endif
+#if CONFIG_H264_VDA_HWACCEL
+ AV_PIX_FMT_VDA_VLD,
+#endif
+#if CONFIG_H264_VDPAU_HWACCEL
+ AV_PIX_FMT_VDPAU,
+#endif
+ AV_PIX_FMT_YUV420P,
+ AV_PIX_FMT_NONE
+};
+
static const enum AVPixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = {
#if CONFIG_H264_DXVA2_HWACCEL
AV_PIX_FMT_DXVA2_VLD,
h->avctx->codec->pix_fmts :
h->avctx->color_range == AVCOL_RANGE_JPEG ?
hwaccel_pixfmt_list_h264_jpeg_420 :
- ff_hwaccel_pixfmt_list_420);
+ h264_hwaccel_pixfmt_list_420);
}
break;
default:
AV_PIX_FMT_XVMC_MPEG2_MC,
AV_PIX_FMT_NONE };
+static const enum AVPixelFormat mpeg12_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_MPEG2_DXVA2_HWACCEL
+ AV_PIX_FMT_DXVA2_VLD,
+#endif
+#if CONFIG_MPEG2_VAAPI_HWACCEL
+ AV_PIX_FMT_VAAPI_VLD,
+#endif
+#if CONFIG_MPEG1_VDPAU_HWACCEL | CONFIG_MPEG2_VDPAU_HWACCEL
+ AV_PIX_FMT_VDPAU,
+#endif
+ AV_PIX_FMT_YUV420P,
+ AV_PIX_FMT_NONE
+};
+
static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
{
Mpeg1Context *s1 = avctx->priv_data;
return AV_PIX_FMT_VDPAU_MPEG2;
} else {
if (s->chroma_format < 2)
- return avctx->get_format(avctx, ff_hwaccel_pixfmt_list_420);
+ return avctx->get_format(avctx, mpeg12_hwaccel_pixfmt_list_420);
else if (s->chroma_format == 2)
return AV_PIX_FMT_YUV422P;
else
CODEC_CAP_FRAME_THREADS,
.flush = ff_mpeg_flush,
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
- .pix_fmts = ff_hwaccel_pixfmt_list_420,
+ .pix_fmts = ff_h263_hwaccel_pixfmt_list_420,
.profiles = NULL_IF_CONFIG_SMALL(mpeg4_video_profiles),
.update_thread_context = ONLY_IF_THREADS_ENABLED(ff_mpeg_update_thread_context),
};
AV_PIX_FMT_NONE
};
-const enum AVPixelFormat ff_hwaccel_pixfmt_list_420[] = {
-#if CONFIG_DXVA2
- AV_PIX_FMT_DXVA2_VLD,
-#endif
-#if CONFIG_VAAPI
- AV_PIX_FMT_VAAPI_VLD,
-#endif
-#if CONFIG_VDA
- AV_PIX_FMT_VDA_VLD,
-#endif
-#if CONFIG_VDPAU
- AV_PIX_FMT_VDPAU,
-#endif
- AV_PIX_FMT_YUV420P,
- AV_PIX_FMT_NONE
-};
-
static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type,
int (*mv)[2][4][2],
int mb_x, int mb_y, int mb_intra, int mb_skipped)
int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared);
extern const enum AVPixelFormat ff_pixfmt_list_420[];
-extern const enum AVPixelFormat ff_hwaccel_pixfmt_list_420[];
/**
* permute block according to permuatation.
{ FF_PROFILE_UNKNOWN },
};
+static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = {
+#if CONFIG_DXVA2
+ AV_PIX_FMT_DXVA2_VLD,
+#endif
+#if CONFIG_VAAPI
+ AV_PIX_FMT_VAAPI_VLD,
+#endif
+#if CONFIG_VDPAU
+ AV_PIX_FMT_VDPAU,
+#endif
+ AV_PIX_FMT_YUV420P,
+ AV_PIX_FMT_NONE
+};
+
AVCodec ff_vc1_decoder = {
.name = "vc1",
.type = AVMEDIA_TYPE_VIDEO,
.flush = ff_mpeg_flush,
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY,
.long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"),
- .pix_fmts = ff_hwaccel_pixfmt_list_420,
+ .pix_fmts = vc1_hwaccel_pixfmt_list_420,
.profiles = NULL_IF_CONFIG_SMALL(profiles)
};
.flush = ff_mpeg_flush,
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY,
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"),
- .pix_fmts = ff_hwaccel_pixfmt_list_420,
+ .pix_fmts = vc1_hwaccel_pixfmt_list_420,
.profiles = NULL_IF_CONFIG_SMALL(profiles)
};
#endif