| OLD | NEW |
| 1 /* | 1 /* |
| 2 * DXVA2 H264 HW acceleration. | 2 * DXVA2 H264 HW acceleration. |
| 3 * | 3 * |
| 4 * copyright (c) 2009 Laurent Aimar | 4 * copyright (c) 2009 Laurent Aimar |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 for (i = 0; i < FF_ARRAY_ELEMS(slice->RefPicList[list]); i++) { | 213 for (i = 0; i < FF_ARRAY_ELEMS(slice->RefPicList[list]); i++) { |
| 214 if (list < h->list_count && i < h->ref_count[list]) { | 214 if (list < h->list_count && i < h->ref_count[list]) { |
| 215 const Picture *r = &h->ref_list[list][i]; | 215 const Picture *r = &h->ref_list[list][i]; |
| 216 unsigned plane; | 216 unsigned plane; |
| 217 fill_picture_entry(&slice->RefPicList[list][i], | 217 fill_picture_entry(&slice->RefPicList[list][i], |
| 218 ff_dxva2_get_surface_index(ctx, r), | 218 ff_dxva2_get_surface_index(ctx, r), |
| 219 r->reference == PICT_BOTTOM_FIELD); | 219 r->reference == PICT_BOTTOM_FIELD); |
| 220 for (plane = 0; plane < 3; plane++) { | 220 for (plane = 0; plane < 3; plane++) { |
| 221 int w, o; | 221 int w, o; |
| 222 if (plane == 0 && h->luma_weight_flag[list]) { | 222 if (plane == 0 && h->luma_weight_flag[list]) { |
| 223 w = h->luma_weight[list][i]; | 223 w = h->luma_weight[i][list][0]; |
| 224 o = h->luma_offset[list][i]; | 224 o = h->luma_weight[i][list][1]; |
| 225 } else if (plane >= 1 && h->chroma_weight_flag[list]) { | 225 } else if (plane >= 1 && h->chroma_weight_flag[list]) { |
| 226 w = h->chroma_weight[list][i][plane-1]; | 226 w = h->chroma_weight[i][list][plane-1][0]; |
| 227 o = h->chroma_offset[list][i][plane-1]; | 227 o = h->chroma_weight[i][list][plane-1][1]; |
| 228 } else { | 228 } else { |
| 229 w = 1 << (plane == 0 ? h->luma_log2_weight_denom : | 229 w = 1 << (plane == 0 ? h->luma_log2_weight_denom : |
| 230 h->chroma_log2_weight_denom); | 230 h->chroma_log2_weight_denom); |
| 231 o = 0; | 231 o = 0; |
| 232 } | 232 } |
| 233 slice->Weights[list][i][plane][0] = w; | 233 slice->Weights[list][i][plane][0] = w; |
| 234 slice->Weights[list][i][plane][1] = o; | 234 slice->Weights[list][i][plane][1] = o; |
| 235 } | 235 } |
| 236 } else { | 236 } else { |
| 237 unsigned plane; | 237 unsigned plane; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 .type = CODEC_TYPE_VIDEO, | 428 .type = CODEC_TYPE_VIDEO, |
| 429 .id = CODEC_ID_H264, | 429 .id = CODEC_ID_H264, |
| 430 .pix_fmt = PIX_FMT_DXVA2_VLD, | 430 .pix_fmt = PIX_FMT_DXVA2_VLD, |
| 431 .capabilities = 0, | 431 .capabilities = 0, |
| 432 .start_frame = start_frame, | 432 .start_frame = start_frame, |
| 433 .decode_slice = decode_slice, | 433 .decode_slice = decode_slice, |
| 434 .end_frame = end_frame, | 434 .end_frame = end_frame, |
| 435 .priv_data_size = sizeof(struct dxva2_picture_context), | 435 .priv_data_size = sizeof(struct dxva2_picture_context), |
| 436 }; | 436 }; |
| 437 | 437 |
| OLD | NEW |