1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/d3d12va: remove unused variables

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-01-24 17:34:01 -03:00
parent 49a7fe86fe
commit 45a2f2635d
6 changed files with 0 additions and 29 deletions

View File

@ -108,9 +108,6 @@ static int d3d12va_av1_decode_slice(AVCodecContext *avctx,
static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
{
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx);
AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
const AV1DecContext *h = avctx->priv_data;
AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private;
void *mapped_data;
@ -142,7 +139,6 @@ static int d3d12va_av1_end_frame(AVCodecContext *avctx)
{
int ret;
const AV1DecContext *h = avctx->priv_data;
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private;
if (ctx_pic->tiles <= 0 || ctx_pic->bitstream_size <= 0)
@ -156,10 +152,8 @@ static int d3d12va_av1_end_frame(AVCodecContext *avctx)
static int d3d12va_av1_decode_init(AVCodecContext *avctx)
{
const AV1DecContext *h = avctx->priv_data;
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
D3D12AV1DecodeContext *av1_ctx = D3D12_AV1_DECODE_CONTEXT(avctx);
AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private;
DXVA_PicParams_AV1 pp;
int ret;
@ -186,9 +180,7 @@ static int d3d12va_av1_decode_init(AVCodecContext *avctx)
static int d3d12va_av1_decode_uninit(AVCodecContext *avctx)
{
const AV1DecContext *h = avctx->priv_data;
D3D12AV1DecodeContext *ctx = D3D12_AV1_DECODE_CONTEXT(avctx);
AV1DecodePictureContext *ctx_pic = h->cur_frame.hwaccel_picture_private;
if (ctx->bitstream_buffer)
av_freep(&ctx->bitstream_buffer);

View File

@ -266,7 +266,6 @@ fail:
int ff_d3d12va_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
{
AVHWFramesContext *frames_ctx = (AVHWFramesContext *)hw_frames_ctx->data;
AVHWDeviceContext *device_ctx = frames_ctx->device_ctx;
frames_ctx->format = AV_PIX_FMT_D3D12;
frames_ctx->sw_format = avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10 ? AV_PIX_FMT_P010 : AV_PIX_FMT_NV12;
@ -408,8 +407,6 @@ static inline int d3d12va_update_reference_frames_state(AVCodecContext *avctx, D
ID3D12Resource *current_resource, int state_before, int state_end)
{
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx);
AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
int num_barrier = 0;
for (int i = 0; i < ctx->max_num_ref; i++) {
@ -436,8 +433,6 @@ int ff_d3d12va_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
{
int ret;
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx);
AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
ID3D12Resource *buffer = NULL;
ID3D12CommandAllocator *command_allocator = NULL;
AVD3D12VAFrame *f = (AVD3D12VAFrame *)frame->data[0];

View File

@ -104,10 +104,6 @@ static int d3d12va_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffe
#define START_CODE_SIZE 3
static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
{
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx);
AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
const H264Context *h = avctx->priv_data;
const H264Picture *current_picture = h->cur_pic_ptr;
H264DecodePictureContext *ctx_pic = current_picture->hwaccel_picture_private;

View File

@ -98,10 +98,6 @@ static int d3d12va_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffe
#define START_CODE_SIZE 3
static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
{
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx);
AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
const HEVCContext *h = avctx->priv_data;
const HEVCFrame *current_picture = h->ref;
HEVCDecodePictureContext *ctx_pic = current_picture->hwaccel_picture_private;
@ -166,7 +162,6 @@ static int d3d12va_hevc_end_frame(AVCodecContext *avctx)
static int d3d12va_hevc_decode_init(AVCodecContext *avctx)
{
HEVCContext *h = avctx->priv_data;
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
DXVA_PicParams_HEVC pp;

View File

@ -95,9 +95,6 @@ static int d3d12va_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
{
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx);
AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
const VC1Context *v = avctx->priv_data;
const MpegEncContext *s = &v->s;
D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;

View File

@ -85,10 +85,6 @@ static int d3d12va_vp9_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
{
D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx);
AVHWFramesContext *frames_ctx = D3D12VA_FRAMES_CONTEXT(avctx);
AVD3D12VAFramesContext *frames_hwctx = frames_ctx->hwctx;
const VP9SharedContext *h = avctx->priv_data;
VP9DecodePictureContext *ctx_pic = h->frames[CUR_FRAME].hwaccel_picture_private;