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

Subscribers

People subscribed via source and target branches