Mercurial > libavcodec.hg
annotate vdpauvideo.c @ 8577:34facb1ab4da libavcodec
ARM: simple_idct_armv6.S whitespace cosmetics
author | mru |
---|---|
date | Mon, 12 Jan 2009 20:37:39 +0000 |
parents | 6687083ec76a |
children | 8b80f8285b1b |
rev | line source |
---|---|
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
1 /* |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
2 * Video Decode and Presentation API for UNIX (VDPAU) is used for |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
3 * HW decode acceleration for MPEG-1/2, H.264 and VC-1. |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
4 * |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
5 * Copyright (c) 2008 NVIDIA. |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
6 * |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
7 * This file is part of FFmpeg. |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
8 * |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
9 * FFmpeg is free software; you can redistribute it and/or |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
10 * modify it under the terms of the GNU Lesser General Public |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
11 * License as published by the Free Software Foundation; either |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
12 * version 2.1 of the License, or (at your option) any later version. |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
13 * |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
14 * FFmpeg is distributed in the hope that it will be useful, |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
17 * Lesser General Public License for more details. |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
18 * |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
19 * You should have received a copy of the GNU Lesser General Public |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
20 * License along with FFmpeg; if not, write to the Free Software |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
22 */ |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
23 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
24 #include <limits.h> |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
25 #include "avcodec.h" |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
26 #include "h264.h" |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
27 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
28 #undef NDEBUG |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
29 #include <assert.h> |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
30 |
8532 | 31 #include "vdpau.h" |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
32 #include "vdpau_internal.h" |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
33 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
34 /** |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
35 * \addtogroup VDPAU_Decoding |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
36 * |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
37 * @{ |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
38 */ |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
39 |
8565 | 40 void ff_vdpau_h264_set_reference_frames(MpegEncContext *s) |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
41 { |
8565 | 42 H264Context *h = s->avctx->priv_data; |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
43 struct vdpau_render_state * render, * render_ref; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
44 VdpReferenceFrameH264 * rf, * rf2; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
45 Picture * pic; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
46 int i, list, pic_frame_idx; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
47 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
48 render = (struct vdpau_render_state*)s->current_picture_ptr->data[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
49 assert(render); |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
50 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
51 rf = &render->info.h264.referenceFrames[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
52 #define H264_RF_COUNT FF_ARRAY_ELEMS(render->info.h264.referenceFrames) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
53 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
54 for (list = 0; list < 2; ++list) { |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
55 Picture **lp = list ? h->long_ref : h->short_ref; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
56 int ls = list ? h->long_ref_count : h->short_ref_count; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
57 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
58 for (i = 0; i < ls; ++i) { |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
59 pic = lp[i]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
60 if (!pic || !pic->reference) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
61 continue; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
62 pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
63 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
64 render_ref = (struct vdpau_render_state*)pic->data[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
65 assert(render_ref); |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
66 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
67 rf2 = &render->info.h264.referenceFrames[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
68 while (rf2 != rf) { |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
69 if ( |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
70 (rf2->surface == render_ref->surface) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
71 && (rf2->is_long_term == pic->long_ref) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
72 && (rf2->frame_idx == pic_frame_idx) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
73 ) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
74 break; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
75 ++rf2; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
76 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
77 if (rf2 != rf) { |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
78 rf2->top_is_reference |= (pic->reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
79 rf2->bottom_is_reference |= (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
80 continue; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
81 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
82 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
83 if (rf >= &render->info.h264.referenceFrames[H264_RF_COUNT]) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
84 continue; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
85 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
86 rf->surface = render_ref->surface; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
87 rf->is_long_term = pic->long_ref; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
88 rf->top_is_reference = (pic->reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
89 rf->bottom_is_reference = (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
90 rf->field_order_cnt[0] = pic->field_poc[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
91 rf->field_order_cnt[1] = pic->field_poc[1]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
92 rf->frame_idx = pic_frame_idx; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
93 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
94 ++rf; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
95 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
96 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
97 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
98 for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) { |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
99 rf->surface = VDP_INVALID_HANDLE; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
100 rf->is_long_term = 0; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
101 rf->top_is_reference = 0; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
102 rf->bottom_is_reference = 0; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
103 rf->field_order_cnt[0] = 0; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
104 rf->field_order_cnt[1] = 0; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
105 rf->frame_idx = 0; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
106 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
107 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
108 |
8563
b59279494d84
Cosmetics: Rename ff_vdpau_h264_add_data_chunk as ff_vdpau_add_data_chunk.
cehoyos
parents:
8562
diff
changeset
|
109 void ff_vdpau_add_data_chunk(MpegEncContext *s, |
b59279494d84
Cosmetics: Rename ff_vdpau_h264_add_data_chunk as ff_vdpau_add_data_chunk.
cehoyos
parents:
8562
diff
changeset
|
110 const uint8_t *buf, int buf_size) |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
111 { |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
112 struct vdpau_render_state * render; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
113 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
114 render = (struct vdpau_render_state*)s->current_picture_ptr->data[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
115 assert(render); |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
116 |
8553 | 117 render->bitstream_buffers= av_fast_realloc( |
118 render->bitstream_buffers, | |
119 &render->bitstream_buffers_allocated, | |
120 sizeof(*render->bitstream_buffers)*(render->bitstream_buffers_used + 1) | |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
121 ); |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
122 |
8553 | 123 render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION; |
124 render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf; | |
125 render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size; | |
126 render->bitstream_buffers_used++; | |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
127 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
128 |
8565 | 129 void ff_vdpau_h264_picture_complete(MpegEncContext *s) |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
130 { |
8565 | 131 H264Context *h = s->avctx->priv_data; |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
132 struct vdpau_render_state * render; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
133 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
134 render = (struct vdpau_render_state*)s->current_picture_ptr->data[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
135 assert(render); |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
136 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
137 render->info.h264.slice_count = h->slice_num; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
138 if (render->info.h264.slice_count < 1) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
139 return; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
140 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
141 for (int i = 0; i < 2; ++i) { |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
142 int foc = s->current_picture_ptr->field_poc[i]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
143 if (foc == INT_MAX) |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
144 foc = 0; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
145 render->info.h264.field_order_cnt[i] = foc; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
146 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
147 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
148 render->info.h264.is_reference = s->current_picture_ptr->reference ? VDP_TRUE : VDP_FALSE; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
149 render->info.h264.frame_num = h->frame_num; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
150 render->info.h264.field_pic_flag = s->picture_structure != PICT_FRAME; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
151 render->info.h264.bottom_field_flag = s->picture_structure == PICT_BOTTOM_FIELD; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
152 render->info.h264.num_ref_frames = h->sps.ref_frame_count; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
153 render->info.h264.mb_adaptive_frame_field_flag = h->sps.mb_aff; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
154 render->info.h264.constrained_intra_pred_flag = h->pps.constrained_intra_pred; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
155 render->info.h264.weighted_pred_flag = h->pps.weighted_pred; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
156 render->info.h264.weighted_bipred_idc = h->pps.weighted_bipred_idc; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
157 render->info.h264.frame_mbs_only_flag = h->sps.frame_mbs_only_flag; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
158 render->info.h264.transform_8x8_mode_flag = h->pps.transform_8x8_mode; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
159 render->info.h264.chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
160 render->info.h264.second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1]; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
161 render->info.h264.pic_init_qp_minus26 = h->pps.init_qp - 26; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
162 render->info.h264.num_ref_idx_l0_active_minus1 = h->pps.ref_count[0] - 1; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
163 render->info.h264.num_ref_idx_l1_active_minus1 = h->pps.ref_count[1] - 1; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
164 render->info.h264.log2_max_frame_num_minus4 = h->sps.log2_max_frame_num - 4; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
165 render->info.h264.pic_order_cnt_type = h->sps.poc_type; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
166 render->info.h264.log2_max_pic_order_cnt_lsb_minus4 = h->sps.log2_max_poc_lsb - 4; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
167 render->info.h264.delta_pic_order_always_zero_flag = h->sps.delta_pic_order_always_zero_flag; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
168 render->info.h264.direct_8x8_inference_flag = h->sps.direct_8x8_inference_flag; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
169 render->info.h264.entropy_coding_mode_flag = h->pps.cabac; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
170 render->info.h264.pic_order_present_flag = h->pps.pic_order_present; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
171 render->info.h264.deblocking_filter_control_present_flag = h->pps.deblocking_filter_parameters_present; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
172 render->info.h264.redundant_pic_cnt_present_flag = h->pps.redundant_pic_cnt_present; |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
173 memcpy(render->info.h264.scaling_lists_4x4, h->pps.scaling_matrix4, sizeof(render->info.h264.scaling_lists_4x4)); |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
174 memcpy(render->info.h264.scaling_lists_8x8, h->pps.scaling_matrix8, sizeof(render->info.h264.scaling_lists_8x8)); |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
175 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
176 ff_draw_horiz_band(s, 0, s->avctx->height); |
8553 | 177 render->bitstream_buffers_used = 0; |
8522
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
178 } |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
179 |
f8c091bb5779
Add VDPAU hardware accelerated decoding for H264 which can be used by
cehoyos
parents:
diff
changeset
|
180 /* @}*/ |