| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 const MpegEncContext *s = &h->s; | 187 const MpegEncContext *s = &h->s; |
| 188 unsigned list; | 188 unsigned list; |
| 189 | 189 |
| 190 memset(slice, 0, sizeof(*slice)); | 190 memset(slice, 0, sizeof(*slice)); |
| 191 slice->BSNALunitDataLocation = position; | 191 slice->BSNALunitDataLocation = position; |
| 192 slice->SliceBytesInBuffer = size; | 192 slice->SliceBytesInBuffer = size; |
| 193 slice->wBadSliceChopping = 0; | 193 slice->wBadSliceChopping = 0; |
| 194 | 194 |
| 195 slice->first_mb_in_slice = (s->mb_y >> FIELD_OR_MBAFF_PICTURE) * s->mb_w
idth + s->mb_x; | 195 slice->first_mb_in_slice = (s->mb_y >> FIELD_OR_MBAFF_PICTURE) * s->mb_w
idth + s->mb_x; |
| 196 slice->NumMbsForSlice = 0; /* XXX it is set once we have all slices *
/ | 196 slice->NumMbsForSlice = 0; /* XXX it is set once we have all slices *
/ |
| 197 slice->BitOffsetToSliceData = get_bits_count(&s->gb) + 8; | 197 slice->BitOffsetToSliceData = get_bits_count(&s->gb); |
| 198 slice->slice_type = ff_h264_get_slice_type(h); | 198 slice->slice_type = ff_h264_get_slice_type(h); |
| 199 if (h->slice_type_fixed) | 199 if (h->slice_type_fixed) |
| 200 slice->slice_type += 5; | 200 slice->slice_type += 5; |
| 201 slice->luma_log2_weight_denom = h->luma_log2_weight_denom; | 201 slice->luma_log2_weight_denom = h->luma_log2_weight_denom; |
| 202 slice->chroma_log2_weight_denom = h->chroma_log2_weight_denom; | 202 slice->chroma_log2_weight_denom = h->chroma_log2_weight_denom; |
| 203 if (h->list_count > 0) | 203 if (h->list_count > 0) |
| 204 slice->num_ref_idx_l0_active_minus1 = h->ref_count[0] - 1; | 204 slice->num_ref_idx_l0_active_minus1 = h->ref_count[0] - 1; |
| 205 if (h->list_count > 1) | 205 if (h->list_count > 1) |
| 206 slice->num_ref_idx_l1_active_minus1 = h->ref_count[1] - 1; | 206 slice->num_ref_idx_l1_active_minus1 = h->ref_count[1] - 1; |
| 207 slice->slice_alpha_c0_offset_div2 = h->slice_alpha_c0_offset / 2 - 26; | 207 slice->slice_alpha_c0_offset_div2 = h->slice_alpha_c0_offset / 2 - 26; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 .type = AVMEDIA_TYPE_VIDEO, | 428 .type = AVMEDIA_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 |