Merge lp:~3v1n0/ubuntu/trusty/vdpau-video/remove-va-constants into lp:ubuntu/trusty-proposed/vdpau-video

Proposed by Marco Trevisan (Treviño)
Status: Approved
Approved by: Iain Lane
Approved revision: 10
Proposed branch: lp:~3v1n0/ubuntu/trusty/vdpau-video/remove-va-constants
Merge into: lp:ubuntu/trusty-proposed/vdpau-video
Diff against target: 389 lines (+334/-2)
6 files modified
.pc/applied-patches (+1/-0)
.pc/libva-constants.patch/src/vdpau_dump.c (+310/-0)
debian/changelog (+1/-0)
debian/patches/libva-constants.patch (+21/-0)
debian/patches/series (+1/-0)
src/vdpau_dump.c (+0/-2)
To merge this branch: bzr merge lp:~3v1n0/ubuntu/trusty/vdpau-video/remove-va-constants
Reviewer Review Type Date Requested Status
Iain Lane Approve
Review via email: mp+219436@code.launchpad.net

Commit message

Add libva-constants.patch to fix FTB with current libva

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

I uploaded this. You needed to create a new changelog entry (this version is used up as the upload is in -proposed), but I did this for you this time.

review: Approve

Unmerged revisions

10. By Marco Trevisan (Treviño)

Add libva-constants.patch to fix FTB with current libva

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.pc/applied-patches'
--- .pc/applied-patches 2014-05-06 23:15:53 +0000
+++ .pc/applied-patches 2014-05-13 21:55:47 +0000
@@ -1,5 +1,6 @@
1autoreconf.patch1autoreconf.patch
2GL_VER_1_3.patch2GL_VER_1_3.patch
3libva-constants.patch
301_dont_clear_va_buffer_too_early.patch401_dont_clear_va_buffer_too_early.patch
402_purge_va_buffers_on_context_destroy_or_new_picture_decode_seq.patch502_purge_va_buffers_on_context_destroy_or_new_picture_decode_seq.patch
503_mark_destroyed_buffers_as_deleted.patch603_mark_destroyed_buffers_as_deleted.patch
67
=== added directory '.pc/libva-constants.patch'
=== added directory '.pc/libva-constants.patch/src'
=== added file '.pc/libva-constants.patch/src/vdpau_dump.c'
--- .pc/libva-constants.patch/src/vdpau_dump.c 1970-01-01 00:00:00 +0000
+++ .pc/libva-constants.patch/src/vdpau_dump.c 2014-05-13 21:55:47 +0000
@@ -0,0 +1,310 @@
1/*
2 * vdpau_dump.c - Dump utilities
3 *
4 * vdpau-video (C) 2009-2011 Splitted-Desktop Systems
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "sysdeps.h"
22#include "vdpau_dump.h"
23
24#define DEBUG 1
25#include "debug.h"
26
27
28// Returns string representation of FOURCC
29const char *string_of_FOURCC(uint32_t fourcc)
30{
31 static char str[5];
32 str[0] = fourcc;
33 str[1] = fourcc >> 8;
34 str[2] = fourcc >> 16;
35 str[3] = fourcc >> 24;
36 str[4] = '\0';
37 return str;
38}
39
40// Returns string representation of VABufferType
41const char *string_of_VABufferType(VABufferType type)
42{
43 const char *str = NULL;
44 switch (type) {
45#define _(X) case X: str = #X; break
46 _(VAPictureParameterBufferType);
47 _(VAIQMatrixBufferType);
48 _(VABitPlaneBufferType);
49 _(VASliceGroupMapBufferType);
50 _(VASliceParameterBufferType);
51 _(VASliceDataBufferType);
52 _(VAMacroblockParameterBufferType);
53 _(VAResidualDataBufferType);
54 _(VADeblockingParameterBufferType);
55 _(VAImageBufferType);
56#if VA_CHECK_VERSION(0,30,0)
57 _(VAProtectedSliceDataBufferType);
58 _(VAEncCodedBufferType);
59 _(VAEncSequenceParameterBufferType);
60 _(VAEncPictureParameterBufferType);
61 _(VAEncSliceParameterBufferType);
62 _(VAEncH264VUIBufferType);
63 _(VAEncH264SEIBufferType);
64#endif
65#undef _
66 }
67 return str;
68}
69
70// Returns string representation of VdpCodec
71const char *string_of_VdpCodec(VdpCodec codec)
72{
73 const char *str = NULL;
74 switch (codec) {
75#define _(X) case VDP_CODEC_##X: str = #X; break
76 _(MPEG1);
77 _(MPEG2);
78 _(MPEG4);
79 _(H264);
80 _(VC1);
81#undef _
82 }
83 return str;
84}
85
86#if USE_TRACER
87#define TRACE trace_print
88#define INDENT(INC) trace_indent(INC)
89#define DUMPi(S, M) TRACE("." #M " = %d,\n", S->M)
90#define DUMPx(S, M) TRACE("." #M " = 0x%08x,\n", S->M)
91#define DUMPp(S, M) TRACE("." #M " = %p,\n", S->M)
92#define DUMPm(S, M, I, J) dump_matrix_NxM(#M, (uint8_t *)S->M, I, J, I * J)
93#else
94#define trace_enabled() (0)
95#define do_nothing() do { } while (0)
96#define TRACE(FORMAT,...) do_nothing()
97#define INDENT(INC) do_nothing()
98#define DUMPi(S, M) do_nothing()
99#define DUMPx(S, M) do_nothing()
100#define DUMPp(S, M) do_nothing()
101#define DUMPm(S, M, I, J) do_nothing()
102#endif
103
104// Dumps matrix[N][M] = N rows x M columns (uint8_t)
105static void
106dump_matrix_NxM(const char *label, uint8_t *matrix, int N, int M, int L)
107{
108 int i, j, n = 0;
109
110 TRACE(".%s = {\n", label);
111 INDENT(1);
112 for (j = 0; j < N; j++) {
113 for (i = 0; i < M; i++, n++) {
114 if (n >= L)
115 break;
116 if (i > 0)
117 TRACE(", ");
118 TRACE("0x%02x", matrix[n]);
119 }
120 if (j < (N - 1))
121 TRACE(",");
122 TRACE("\n");
123 if (n >= L)
124 break;
125 }
126 INDENT(-1);
127 TRACE("}\n");
128}
129
130// Dumps VdpPictureInfoMPEG1Or2
131void dump_VdpPictureInfoMPEG1Or2(VdpPictureInfoMPEG1Or2 *pic_info)
132{
133 INDENT(1);
134 TRACE("VdpPictureInfoMPEG1Or2 = {\n");
135 INDENT(1);
136 DUMPx(pic_info, forward_reference);
137 DUMPx(pic_info, backward_reference);
138 DUMPi(pic_info, slice_count);
139 DUMPi(pic_info, picture_structure);
140 DUMPi(pic_info, picture_coding_type);
141 DUMPi(pic_info, intra_dc_precision);
142 DUMPi(pic_info, frame_pred_frame_dct);
143 DUMPi(pic_info, concealment_motion_vectors);
144 DUMPi(pic_info, intra_vlc_format);
145 DUMPi(pic_info, alternate_scan);
146 DUMPi(pic_info, q_scale_type);
147 DUMPi(pic_info, top_field_first);
148 DUMPi(pic_info, full_pel_forward_vector);
149 DUMPi(pic_info, full_pel_backward_vector);
150 TRACE(".f_code = { { %d, %d }, { %d, %d } };\n",
151 pic_info->f_code[0][0], pic_info->f_code[0][1],
152 pic_info->f_code[1][0], pic_info->f_code[1][1]);
153 DUMPm(pic_info, intra_quantizer_matrix, 8, 8);
154 DUMPm(pic_info, non_intra_quantizer_matrix, 8, 8);
155 INDENT(-1);
156 TRACE("};\n");
157 INDENT(-1);
158}
159
160// Dumps VdpPictureInfoMPEG4Part2
161#if HAVE_VDPAU_MPEG4
162void dump_VdpPictureInfoMPEG4Part2(VdpPictureInfoMPEG4Part2 *pic_info)
163{
164 INDENT(1);
165 TRACE("VdpPictureInfoMPEG4Part2 = {\n");
166 INDENT(1);
167 DUMPx(pic_info, forward_reference);
168 DUMPx(pic_info, backward_reference);
169 DUMPi(pic_info, vop_time_increment_resolution);
170 DUMPi(pic_info, vop_coding_type);
171 DUMPi(pic_info, vop_fcode_forward);
172 DUMPi(pic_info, vop_fcode_backward);
173 DUMPi(pic_info, resync_marker_disable);
174 DUMPi(pic_info, interlaced);
175 DUMPi(pic_info, quant_type);
176 DUMPi(pic_info, quarter_sample);
177 DUMPi(pic_info, short_video_header);
178 DUMPi(pic_info, rounding_control);
179 DUMPi(pic_info, alternate_vertical_scan_flag);
180 DUMPi(pic_info, top_field_first);
181 DUMPm(pic_info, intra_quantizer_matrix, 8, 8);
182 DUMPm(pic_info, non_intra_quantizer_matrix, 8, 8);
183 INDENT(-1);
184 TRACE("};\n");
185 INDENT(-1);
186}
187#endif
188
189// Dumps VdpReferenceFrameH264
190static void
191dump_VdpReferenceFrameH264(VdpReferenceFrameH264 *rf, const char *label)
192{
193 TRACE(".%s = {\n", label);
194 INDENT(1);
195 DUMPx(rf, surface);
196 DUMPi(rf, is_long_term);
197 DUMPi(rf, top_is_reference);
198 DUMPi(rf, bottom_is_reference);
199 DUMPi(rf, field_order_cnt[0]);
200 DUMPi(rf, field_order_cnt[1]);
201 DUMPi(rf, frame_idx);
202 INDENT(-1);
203 TRACE("}\n");
204}
205
206// Dumps VdpPictureInfoH264
207void dump_VdpPictureInfoH264(VdpPictureInfoH264 *pic_info)
208{
209 int i;
210
211 INDENT(1);
212 TRACE("VdpPictureInfoH264 = {\n");
213 INDENT(1);
214 DUMPi(pic_info, slice_count);
215 DUMPi(pic_info, field_order_cnt[0]);
216 DUMPi(pic_info, field_order_cnt[1]);
217 DUMPi(pic_info, is_reference);
218 DUMPi(pic_info, frame_num);
219 DUMPi(pic_info, field_pic_flag);
220 DUMPi(pic_info, bottom_field_flag);
221 DUMPi(pic_info, num_ref_frames);
222 DUMPi(pic_info, mb_adaptive_frame_field_flag);
223 DUMPi(pic_info, constrained_intra_pred_flag);
224 DUMPi(pic_info, weighted_pred_flag);
225 DUMPi(pic_info, weighted_bipred_idc);
226 DUMPi(pic_info, frame_mbs_only_flag);
227 DUMPi(pic_info, transform_8x8_mode_flag);
228 DUMPi(pic_info, chroma_qp_index_offset);
229 DUMPi(pic_info, second_chroma_qp_index_offset);
230 DUMPi(pic_info, pic_init_qp_minus26);
231 DUMPi(pic_info, num_ref_idx_l0_active_minus1);
232 DUMPi(pic_info, num_ref_idx_l1_active_minus1);
233 DUMPi(pic_info, log2_max_frame_num_minus4);
234 DUMPi(pic_info, pic_order_cnt_type);
235 DUMPi(pic_info, log2_max_pic_order_cnt_lsb_minus4);
236 DUMPi(pic_info, delta_pic_order_always_zero_flag);
237 DUMPi(pic_info, direct_8x8_inference_flag);
238 DUMPi(pic_info, entropy_coding_mode_flag);
239 DUMPi(pic_info, pic_order_present_flag);
240 DUMPi(pic_info, deblocking_filter_control_present_flag);
241 DUMPi(pic_info, redundant_pic_cnt_present_flag);
242 DUMPm(pic_info, scaling_lists_4x4, 6, 16);
243 DUMPm(pic_info, scaling_lists_8x8[0], 8, 8);
244 DUMPm(pic_info, scaling_lists_8x8[1], 8, 8);
245 for (i = 0; i < 16; i++) {
246 char label[100];
247 sprintf(label, "referenceFrames[%d]", i);
248 dump_VdpReferenceFrameH264(&pic_info->referenceFrames[i], label);
249 }
250 INDENT(-1);
251 TRACE("};\n");
252 INDENT(-1);
253}
254
255// Dumps VdpPictureInfoVC1
256void dump_VdpPictureInfoVC1(VdpPictureInfoVC1 *pic_info)
257{
258 INDENT(1);
259 TRACE("VdpPictureInfoVC1 = {\n");
260 INDENT(1);
261 DUMPx(pic_info, forward_reference);
262 DUMPx(pic_info, backward_reference);
263 DUMPi(pic_info, slice_count);
264 DUMPi(pic_info, picture_type);
265 DUMPi(pic_info, frame_coding_mode);
266 DUMPi(pic_info, postprocflag);
267 DUMPi(pic_info, pulldown);
268 DUMPi(pic_info, interlace);
269 DUMPi(pic_info, tfcntrflag);
270 DUMPi(pic_info, finterpflag);
271 DUMPi(pic_info, psf);
272 DUMPi(pic_info, dquant);
273 DUMPi(pic_info, panscan_flag);
274 DUMPi(pic_info, refdist_flag);
275 DUMPi(pic_info, quantizer);
276 DUMPi(pic_info, extended_mv);
277 DUMPi(pic_info, extended_dmv);
278 DUMPi(pic_info, overlap);
279 DUMPi(pic_info, vstransform);
280 DUMPi(pic_info, loopfilter);
281 DUMPi(pic_info, fastuvmc);
282 DUMPi(pic_info, range_mapy_flag);
283 DUMPi(pic_info, range_mapy);
284 DUMPi(pic_info, range_mapuv_flag);
285 DUMPi(pic_info, range_mapuv);
286 DUMPi(pic_info, multires);
287 DUMPi(pic_info, syncmarker);
288 DUMPi(pic_info, rangered);
289 DUMPi(pic_info, maxbframes);
290 DUMPi(pic_info, deblockEnable);
291 DUMPi(pic_info, pquant);
292 INDENT(-1);
293 TRACE("};\n");
294 INDENT(-1);
295}
296
297// Dumps VdpBitstreamBuffer
298void dump_VdpBitstreamBuffer(VdpBitstreamBuffer *bitstream_buffer)
299{
300 const uint8_t *buffer = bitstream_buffer->bitstream;
301 const uint32_t size = bitstream_buffer->bitstream_bytes;
302
303 INDENT(1);
304 TRACE("VdpBitstreamBuffer (%d bytes) = {\n", size);
305 INDENT(1);
306 dump_matrix_NxM("buffer", buffer, 10, 15, size);
307 INDENT(-1);
308 TRACE("};\n");
309 INDENT(-1);
310}
0311
=== modified file 'debian/changelog'
--- debian/changelog 2014-05-06 23:15:53 +0000
+++ debian/changelog 2014-05-13 21:55:47 +0000
@@ -2,6 +2,7 @@
22
3 * Added patch-set from upstream to fix crash when using3 * Added patch-set from upstream to fix crash when using
4 gstreamer-vaapi (LP: #1222790)4 gstreamer-vaapi (LP: #1222790)
5 * Add libva-constants.patch to fix FTB with current libva
56
6 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 06 May 2014 23:15:53 +02007 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 06 May 2014 23:15:53 +0200
78
89
=== added file 'debian/patches/libva-constants.patch'
--- debian/patches/libva-constants.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/libva-constants.patch 2014-05-13 21:55:47 +0000
@@ -0,0 +1,21 @@
1Description: Remove constants dropped from VA API
2Origin: upstream,
3 http://lists.freedesktop.org/archives/libva/2013-June/001762.html
4Last-Update: 2014-05-09
5
6diff --git a/src/vdpau_dump.c b/src/vdpau_dump.c
7index 899888b..610e7cd 100644
8--- a/src/vdpau_dump.c
9+++ b/src/vdpau_dump.c
10@@ -59,8 +59,6 @@ const char *string_of_VABufferType(VABufferType type)
11 _(VAEncSequenceParameterBufferType);
12 _(VAEncPictureParameterBufferType);
13 _(VAEncSliceParameterBufferType);
14- _(VAEncH264VUIBufferType);
15- _(VAEncH264SEIBufferType);
16 #endif
17 #if VA_CHECK_VERSION(0,31,1)
18 _(VAQMatrixBufferType);
19--
201.7.9.5
21
022
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-05-06 23:15:53 +0000
+++ debian/patches/series 2014-05-13 21:55:47 +0000
@@ -1,5 +1,6 @@
1autoreconf.patch1autoreconf.patch
2GL_VER_1_3.patch2GL_VER_1_3.patch
3libva-constants.patch
301_dont_clear_va_buffer_too_early.patch401_dont_clear_va_buffer_too_early.patch
402_purge_va_buffers_on_context_destroy_or_new_picture_decode_seq.patch502_purge_va_buffers_on_context_destroy_or_new_picture_decode_seq.patch
503_mark_destroyed_buffers_as_deleted.patch603_mark_destroyed_buffers_as_deleted.patch
67
=== modified file 'src/vdpau_dump.c'
--- src/vdpau_dump.c 2011-09-22 11:35:45 +0000
+++ src/vdpau_dump.c 2014-05-13 21:55:47 +0000
@@ -59,8 +59,6 @@
59 _(VAEncSequenceParameterBufferType);59 _(VAEncSequenceParameterBufferType);
60 _(VAEncPictureParameterBufferType);60 _(VAEncPictureParameterBufferType);
61 _(VAEncSliceParameterBufferType);61 _(VAEncSliceParameterBufferType);
62 _(VAEncH264VUIBufferType);
63 _(VAEncH264SEIBufferType);
64#endif62#endif
65#undef _63#undef _
66 }64 }

Subscribers

People subscribed via source and target branches