Old Intel GPUs expect the reference frame index to the actual surface, instead of the index into RefFrameList as specified by the spec. This workaround should be set when using one of the "ClearVideo" decoder devices.
Unified · Split
| @@ -13,6 +13,9 @@ libavutil: 2013-12-xx · 12 unmodified lines | ||
| 13 | 13 | |
| 14 | 14 | API changes, most recent first: |
| 15 | 15 | |
| 16 | +2014-04-xx - xxxxxxx - lavc 55.50.0 - dxva2.h | |
| 17 | + Add FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO for old Intel GPUs. | |
| 18 | + | |
| 16 | 19 | 2014-04-xx - xxxxxxx - lavu 53.13.0 - avutil.h |
| 17 | 20 | Add av_get_time_base_q(). |
| 18 | 21 | |
| @@ -42,6 +42,7 @@ · 41 unmodified lines | ||
| 42 | 42 | */ |
| 43 | 43 | |
| 44 | 44 | #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards |
| 45 | +#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface | |
| 45 | 46 | |
| 46 | 47 | /** |
| 47 | 48 | * This structure is used to provides the necessary configurations and data |
| @@ -116,6 +116,8 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context · 115 unmodified lines | ||
| 116 | 116 | pp->bit_depth_chroma_minus8 = h->sps.bit_depth_chroma - 8; |
| 117 | 117 | if (ctx->workaround & FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG) |
| 118 | 118 | pp->Reserved16Bits = 0; |
| 119 | + else if (ctx->workaround & FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO) | |
| 120 | + pp->Reserved16Bits = 0x34c; | |
| 119 | 121 | else |
| 120 | 122 | pp->Reserved16Bits = 3; /* FIXME is there a way to detect the right mode ? */ |
| 121 | 123 | pp->StatusReportFeedbackNumber = 1 + ctx->report_id++; |
| @@ -239,7 +241,11 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, · 117 unmodified lines | ||
| 239 | 241 | if (list < h->list_count && i < h->ref_count[list]) { |
| 240 | 242 | const H264Picture *r = &h->ref_list[list][i]; |
| 241 | 243 | unsigned plane; |
| 242 | − unsigned index = get_refpic_index(pp, ff_dxva2_get_surface_index(ctx, &r->f)); | |
| 244 | + unsigned index; | |
| 245 | + if (ctx->workaround & FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO) | |
| 246 | + index = ff_dxva2_get_surface_index(ctx, &r->f); | |
| 247 | + else | |
| 248 | + index = get_refpic_index(pp, ff_dxva2_get_surface_index(ctx, &r->f)); | |
| 243 | 249 | fill_picture_entry(&slice->RefPicList[list][i], index, |
| 244 | 250 | r->reference == PICT_BOTTOM_FIELD); |
| 245 | 251 | for (plane = 0; plane < 3; plane++) { |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | #include "libavutil/version.h" |
| 30 | 30 | |
| 31 | 31 | #define LIBAVCODEC_VERSION_MAJOR 55 |
| 32 | −#define LIBAVCODEC_VERSION_MINOR 49 | |
| 32 | +#define LIBAVCODEC_VERSION_MINOR 50 | |
| 33 | 33 | #define LIBAVCODEC_VERSION_MICRO 0 |
| 34 | 34 | |
| 35 | 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |