Skip to content

Commit

Permalink
ffmpeg: dxva drop outdated patches
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Jan 28, 2014
1 parent b6d31a3 commit 6e6c3b5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 173 deletions.
1 change: 0 additions & 1 deletion lib/ffmpeg/libavcodec/dxva2.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ struct dxva_context {
* Private to the FFmpeg AVHWAccel implementation
*/
unsigned report_id;
unsigned last_slice_count;
};

/**
Expand Down
25 changes: 3 additions & 22 deletions lib/ffmpeg/libavcodec/dxva2_mpeg2.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@

#include "dxva2_internal.h"

#define MAX_SLICES (SLICE_MAX_START_CODE - SLICE_MIN_START_CODE + 1)
struct dxva2_picture_context {
DXVA_PictureParameters pp;
DXVA_QmatrixData qm;
unsigned slice_count;
DXVA_SliceInfo *slice;
unsigned int slice_alloc;

DXVA_SliceInfo slice[MAX_SLICES];
const uint8_t *bitstream;
unsigned bitstream_size;
};
Expand Down Expand Up @@ -220,20 +219,9 @@ static int dxva2_mpeg2_start_frame(AVCodecContext *avctx,
fill_quantization_matrices(avctx, ctx, s, &ctx_pic->qm);

ctx_pic->slice_count = 0;
ctx_pic->slice = NULL;
ctx_pic->slice_alloc = 0;
ctx_pic->bitstream_size = 0;
ctx_pic->bitstream = NULL;

if (ctx->last_slice_count > 0)
{
ctx_pic->slice = av_fast_realloc(NULL,
&ctx_pic->slice_alloc,
ctx->last_slice_count * sizeof(DXVA_SliceInfo));
if (!ctx_pic->slice)
return -1;
}

return 0;
}

Expand All @@ -244,14 +232,9 @@ static int dxva2_mpeg2_decode_slice(AVCodecContext *avctx,
struct dxva2_picture_context *ctx_pic =
s->current_picture_ptr->f.hwaccel_picture_private;
unsigned position;
DXVA_SliceInfo* slice;

slice = av_fast_realloc(ctx_pic->slice,
&ctx_pic->slice_alloc,
(ctx_pic->slice_count + 1) * sizeof(DXVA_SliceInfo));
if (!slice)
if (ctx_pic->slice_count >= MAX_SLICES)
return -1;
ctx_pic->slice = slice;

if (!ctx_pic->bitstream)
ctx_pic->bitstream = buffer;
Expand All @@ -268,7 +251,6 @@ static int dxva2_mpeg2_end_frame(AVCodecContext *avctx)
struct MpegEncContext *s = avctx->priv_data;
struct dxva2_picture_context *ctx_pic =
s->current_picture_ptr->f.hwaccel_picture_private;
struct dxva_context *ctx = avctx->hwaccel_context;
int ret;

if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
Expand All @@ -280,7 +262,6 @@ static int dxva2_mpeg2_end_frame(AVCodecContext *avctx)
if (!ret)
ff_mpeg_draw_horiz_band(s, 0, avctx->height);

ctx->last_slice_count = ctx_pic->slice_count;
return ret;
}

Expand Down

This file was deleted.

75 changes: 0 additions & 75 deletions lib/ffmpeg/patches/0019-dxva-mpeg2-speed-up-slice-allocation.patch

This file was deleted.

0 comments on commit 6e6c3b5

Please sign in to comment.