diff -Nru libva-1.1.1.pre1~git20120529.90460bb/autogen.sh libva-1.1.1.pre1~git20120727.8b2835e/autogen.sh --- libva-1.1.1.pre1~git20120529.90460bb/autogen.sh 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/autogen.sh 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,25 @@ +# Copyright (c) 2007 Intel Corporation. All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sub license, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice (including the +# next paragraph) shall be included in all copies or substantial portions +# of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + #! /bin/sh autoreconf -v --install ./configure "$@" diff -Nru libva-1.1.1.pre1~git20120529.90460bb/build/gen_version.sh libva-1.1.1.pre1~git20120727.8b2835e/build/gen_version.sh --- libva-1.1.1.pre1~git20120529.90460bb/build/gen_version.sh 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/build/gen_version.sh 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,25 @@ +# Copyright (c) 2007 Intel Corporation. All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sub license, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice (including the +# next paragraph) shall be included in all copies or substantial portions +# of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + #!/bin/sh libva_topdir="$1" diff -Nru libva-1.1.1.pre1~git20120529.90460bb/configure.ac libva-1.1.1.pre1~git20120727.8b2835e/configure.ac --- libva-1.1.1.pre1~git20120529.90460bb/configure.ac 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/configure.ac 2012-07-30 07:20:35.000000000 +0000 @@ -42,7 +42,7 @@ # - reset micro version to zero when VA-API major or minor version is changed m4_define([libva_major_version], [m4_eval(va_api_major_version + 1)]) m4_define([libva_minor_version], [m4_eval(va_api_minor_version - 32)]) -m4_define([libva_micro_version], [1]) +m4_define([libva_micro_version], [0]) m4_define([libva_pre_version], [1]) m4_define([libva_version], @@ -221,7 +221,7 @@ AC_SUBST(EGL_DEPS_CFLAGS) AC_SUBST(EGL_DEPS_LIBS) AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes") -AM_CONDITIONAL(BUILD_EGL_TEST, [test "x$libglesv1_cm" = "xyes"]) +AM_CONDITIONAL(BUILD_EGL_TEST, [test "x$USE_EGL" = "xyes" && test "x$libglesv1_cm" = "xyes"]) # We only need the headers, we don't link against the DRM libraries LIBVA_CFLAGS="$DRM_CFLAGS" diff -Nru libva-1.1.1.pre1~git20120529.90460bb/debian/changelog libva-1.1.1.pre1~git20120727.8b2835e/debian/changelog --- libva-1.1.1.pre1~git20120529.90460bb/debian/changelog 2012-06-15 06:29:48.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/debian/changelog 2012-07-30 07:21:00.000000000 +0000 @@ -1,8 +1,8 @@ -libva (1.1.1.pre1~git20120529.90460bb-ppa2~oneiric) oneiric; urgency=medium +libva (1.1.1.pre1~git20120727.8b2835e-ppa1~oneiric) oneiric; urgency=medium * libva git . - -- Semen Apukhtin (FANTOM) Fri, 15 Jun 2012 10:29:48 +0400 + -- Semen Apukhtin (FANTOM) Mon, 30 Jul 2012 11:21:00 +0400 libva (1.1.1.pre1) oneiric; urgency=medium diff -Nru libva-1.1.1.pre1~git20120529.90460bb/debian/patches/series libva-1.1.1.pre1~git20120727.8b2835e/debian/patches/series --- libva-1.1.1.pre1~git20120529.90460bb/debian/patches/series 2011-10-31 00:42:40.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/debian/patches/series 2012-07-30 07:20:25.000000000 +0000 @@ -1,2 +1,2 @@ -remove-unneeded-dep.patch -remove-unneeded-dep2.patch +#remove-unneeded-dep.patch +#remove-unneeded-dep2.patch diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/android_winsys.cpp libva-1.1.1.pre1~git20120727.8b2835e/test/android_winsys.cpp --- libva-1.1.1.pre1~git20120529.90460bb/test/android_winsys.cpp 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/android_winsys.cpp 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #include namespace android { diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/basic/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/test/basic/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/test/basic/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/basic/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -20,12 +20,12 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -check_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \ +noinst_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \ test_07 test_08 test_09 test_10 test_11 AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 -TEST_LIBS = $(top_builddir)/va/$(libvabackendlib) +TEST_LIBS = $(top_builddir)/va/$(libvabackendlib) $(top_builddir)/va/$(libvacorelib) -lpthread -lX11 test_01_LDADD = $(TEST_LIBS) test_01_SOURCES = test_01.c @@ -60,9 +60,9 @@ test_11_LDADD = $(TEST_LIBS) test_11_SOURCES = test_11.c -EXTRA_DIST = test_common.c +EXTRA_DIST = test_common.c test_x11.c -valgrind: $(check_PROGRAMS) - for a in $(check_PROGRAMS); do \ +valgrind: $(noinst_PROGRAMS) + for a in $(noinst_PROGRAMS); do \ valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ done diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/decode/loadjpeg.c libva-1.1.1.pre1~git20120727.8b2835e/test/decode/loadjpeg.c --- libva-1.1.1.pre1~git20120529.90460bb/test/decode/loadjpeg.c 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/decode/loadjpeg.c 2012-07-30 07:20:35.000000000 +0000 @@ -87,7 +87,7 @@ /* Get the size of the image */ tinyjpeg_get_size(jdec, &width, &height); - printf("Decoding JPEG image %xx%x...\n", width, height); + printf("Decoding JPEG image %dx%d...\n", width, height); if (tinyjpeg_decode(jdec) < 0) exitmessage(tinyjpeg_get_errorstring(jdec)); diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/decode/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/test/decode/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/test/decode/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/decode/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -36,3 +36,8 @@ for a in $(bin_PROGRAMS); do \ valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ done + +EXTRA_DIST = \ + tinyjpeg.h \ + tinyjpeg-internal.h \ + $(NULL) diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/decode/tinyjpeg.c libva-1.1.1.pre1~git20120727.8b2835e/test/decode/tinyjpeg.c --- libva-1.1.1.pre1~git20120529.90460bb/test/decode/tinyjpeg.c 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/decode/tinyjpeg.c 2012-07-30 07:20:35.000000000 +0000 @@ -60,6 +60,14 @@ #define BLACK_U 127 #define BLACK_V 127 +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif +#define ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) + #if DEBUG #define trace(fmt, args...) do { \ fprintf(stderr, fmt, ## args); \ @@ -75,15 +83,15 @@ /* Global variable to return the last error found while deconding */ static char error_string[256]; -static VAHuffmanTableBufferJPEG default_huffman_table_param={ +static VAHuffmanTableBufferJPEGBaseline default_huffman_table_param={ huffman_table: { // lumiance component { - dc_bits:{0,1,5,1,1,1,1,1,1,0,0,0}, // 12 bits is ok for baseline profile - dc_huffval:{0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b}, - ac_bits:{0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125}, - ac_huffval:{ + num_dc_codes:{0,1,5,1,1,1,1,1,1,0,0,0}, // 12 bits is ok for baseline profile + dc_values:{0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b}, + num_ac_codes:{0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125}, + ac_values:{ 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, @@ -109,10 +117,10 @@ }, // chrom component { - dc_bits:{0,3,1,1,1,1,1,1,1,1,1,0}, // 12 bits is ok for baseline profile - dc_huffval:{0,1,2,3,4,5,6,7,8,9,0xa,0xb}, - ac_bits:{0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119}, - ac_huffval:{ + num_dc_codes:{0,3,1,1,1,1,1,1,1,1,1,0}, // 12 bits is ok for baseline profile + dc_values:{0,1,2,3,4,5,6,7,8,9,0xa,0xb}, + num_ac_codes:{0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119}, + ac_values:{ 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, @@ -149,10 +157,12 @@ return 0; for (i = 0; i < 4; i++) { - memcpy(priv->HTDC[i].bits, default_huffman_table_param.huffman_table[i].dc_bits, 16); - memcpy(priv->HTDC[i].values, default_huffman_table_param.huffman_table[i].dc_huffval, 16); - memcpy(priv->HTAC[i].bits, default_huffman_table_param.huffman_table[i].ac_bits, 16); - memcpy(priv->HTAC[i].values, default_huffman_table_param.huffman_table[i].ac_huffval, 256); + priv->HTDC_valid[i] = 1; + memcpy(priv->HTDC[i].bits, default_huffman_table_param.huffman_table[i].num_dc_codes, 16); + memcpy(priv->HTDC[i].values, default_huffman_table_param.huffman_table[i].dc_values, 16); + priv->HTAC_valid[i] = 1; + memcpy(priv->HTAC[i].bits, default_huffman_table_param.huffman_table[i].num_ac_codes, 16); + memcpy(priv->HTAC[i].values, default_huffman_table_param.huffman_table[i].ac_values, 256); } priv->default_huffman_table_initialized = 1; return 0; @@ -203,6 +213,7 @@ error("No more 4 quantization table is supported (got %d)\n", qi); #endif memcpy(priv->Q_tables[qi&0x0F], stream, 64); + priv->Q_tables_valid[qi & 0x0f] = 1; stream += 64; } trace("< DQT marker\n"); @@ -314,9 +325,11 @@ Th = index & 0x0f; if (Tc) { memcpy(priv->HTAC[index & 0xf].bits, stream, 16); + priv->HTAC_valid[index & 0xf] = 1; } else { memcpy(priv->HTDC[index & 0xf].bits, stream, 12); + priv->HTDC_valid[index & 0xf] = 1; } count = 0; @@ -535,7 +548,7 @@ VAStatus va_status; int max_h_factor, max_v_factor; int putsurface=1; - unsigned int i; + unsigned int i, j; x11_display = XOpenDisplay(":0.0"); @@ -576,8 +589,10 @@ &attrib, 1,&config_id); CHECK_VASTATUS(va_status, "vaQueryConfigEntrypoints"); - va_status = vaCreateSurfaces(va_dpy,priv->width,priv->height, //alignment? - VA_RT_FORMAT_YUV420, 1, &surface_id); + va_status = vaCreateSurfaces(va_dpy, + priv->width,priv->height, //alignment? + VA_RT_FORMAT_YUV420, + 1, &surface_id); CHECK_VASTATUS(va_status, "vaCreateSurfaces"); /* Create a context for this decode pipe */ @@ -588,14 +603,11 @@ 1, &context_id); CHECK_VASTATUS(va_status, "vaCreateContext"); - - VAPictureParameterBufferJPEG pic_param; + VAPictureParameterBufferJPEGBaseline pic_param; memset(&pic_param, 0, sizeof(pic_param)); - pic_param.type = VA_JPEG_SOF0; // tinyjpeg support baseline profile only, does it match va capability? - pic_param.sample_precision = 8; // tinyjpeg support baseline profile only, does it match va capability? - pic_param.image_width = priv->width; - pic_param.image_height = priv->height; + pic_param.picture_width = priv->width; + pic_param.picture_height = priv->height; pic_param.num_components = priv->nf_components; for (i=0; icomponent_infos[i].Vfactor; pic_param.components[i].quantiser_table_selector = priv->component_infos[i].quant_table_index; } - - pic_param.roi.enabled = 0; - pic_param.roi.start_x = 0; - pic_param.roi.start_y = 0; - pic_param.roi.end_x = 0; - pic_param.roi.end_y = 0; - pic_param.rotation = 0; va_status = vaCreateBuffer(va_dpy, context_id, - VAPictureParameterBufferType, // VAPictureParameterBufferJPEG? - sizeof(VAPictureParameterBufferJPEG), + VAPictureParameterBufferType, // VAPictureParameterBufferJPEGBaseline? + sizeof(VAPictureParameterBufferJPEGBaseline), 1, &pic_param, &pic_param_buf); CHECK_VASTATUS(va_status, "vaCreateBuffer"); - VAIQMatrixBufferJPEG iq_matrix; + VAIQMatrixBufferJPEGBaseline iq_matrix; + const unsigned int num_quant_tables = + MIN(COMPONENTS, ARRAY_ELEMS(iq_matrix.load_quantiser_table)); // todo, only mask it if non-default quant matrix is used. do we need build default quant matrix? - memset(&iq_matrix, 0, sizeof(VAIQMatrixBufferJPEG)); - for (i = 0; i < COMPONENTS; i++) { - iq_matrix.precision[i] = 0; - memcpy(iq_matrix.quantiser_matrix[i], priv->Q_tables[i], 64); + memset(&iq_matrix, 0, sizeof(VAIQMatrixBufferJPEGBaseline)); + for (i = 0; i < num_quant_tables; i++) { + if (!priv->Q_tables_valid[i]) + continue; + iq_matrix.load_quantiser_table[i] = 1; + for (j = 0; j < 64; j++) + iq_matrix.quantiser_table[i][j] = priv->Q_tables[i][j]; } va_status = vaCreateBuffer(va_dpy, context_id, - VAIQMatrixBufferType, // VAIQMatrixBufferJPEG? - sizeof(VAIQMatrixBufferJPEG), + VAIQMatrixBufferType, // VAIQMatrixBufferJPEGBaseline? + sizeof(VAIQMatrixBufferJPEGBaseline), 1, &iq_matrix, &iqmatrix_buf ); CHECK_VASTATUS(va_status, "vaCreateBuffer"); - VAHuffmanTableBufferJPEG huffman_table; - memset(&huffman_table, 0, sizeof(VAHuffmanTableBufferJPEG)); - for (i = 0; i < COMPONENTS; i++) { - memcpy(huffman_table.huffman_table[i].dc_bits, priv->HTDC[i].bits, 16); - memcpy(huffman_table.huffman_table[i].dc_huffval, priv->HTDC[i].values, 16); - memcpy(huffman_table.huffman_table[i].ac_bits, priv->HTAC[i].bits, 16); - memcpy(huffman_table.huffman_table[i].ac_huffval, priv->HTAC[i].values, 256); + VAHuffmanTableBufferJPEGBaseline huffman_table; + const unsigned int num_huffman_tables = + MIN(COMPONENTS, ARRAY_ELEMS(huffman_table.load_huffman_table)); + memset(&huffman_table, 0, sizeof(VAHuffmanTableBufferJPEGBaseline)); + assert(sizeof(huffman_table.huffman_table[0].num_dc_codes) == + sizeof(priv->HTDC[0].bits)); + assert(sizeof(huffman_table.huffman_table[0].dc_values[0]) == + sizeof(priv->HTDC[0].values[0])); + for (i = 0; i < num_huffman_tables; i++) { + if (!priv->HTDC_valid[i] || !priv->HTAC_valid[i]) + continue; + huffman_table.load_huffman_table[i] = 1; + memcpy(huffman_table.huffman_table[i].num_dc_codes, priv->HTDC[i].bits, + sizeof(huffman_table.huffman_table[i].num_dc_codes)); + memcpy(huffman_table.huffman_table[i].dc_values, priv->HTDC[i].values, + sizeof(huffman_table.huffman_table[i].dc_values)); + memcpy(huffman_table.huffman_table[i].num_ac_codes, priv->HTAC[i].bits, + sizeof(huffman_table.huffman_table[i].num_ac_codes)); + memcpy(huffman_table.huffman_table[i].ac_values, priv->HTAC[i].values, + sizeof(huffman_table.huffman_table[i].ac_values)); } va_status = vaCreateBuffer(va_dpy, context_id, - VAHuffmanTableBufferType, // VAHuffmanTableBufferJPEG? - sizeof(VAHuffmanTableBufferJPEG), + VAHuffmanTableBufferType, // VAHuffmanTableBufferJPEGBaseline? + sizeof(VAHuffmanTableBufferJPEGBaseline), 1, &huffman_table, &huffmantable_buf ); CHECK_VASTATUS(va_status, "vaCreateBuffer"); @@ -652,7 +675,7 @@ // one slice for whole image? max_h_factor = priv->component_infos[0].Hfactor; max_v_factor = priv->component_infos[0].Vfactor; - static VASliceParameterBufferJPEG slice_param; + static VASliceParameterBufferJPEGBaseline slice_param; slice_param.slice_data_size = priv->stream_end - priv->stream; slice_param.slice_data_offset = 0; slice_param.slice_data_flag = VA_SLICE_DATA_FLAG_ALL; @@ -660,17 +683,17 @@ slice_param.slice_vertical_position = 0; slice_param.num_components = priv->cur_sos.nr_components; for (i = 0; i < slice_param.num_components; i++) { - slice_param.components[i].component_id = priv->cur_sos.components[i].component_id; /* FIXME: set to values specified in SOS */ - slice_param.components[i].dc_selector = priv->cur_sos.components[i].dc_selector; /* FIXME: set to values specified in SOS */ - slice_param.components[i].ac_selector = priv->cur_sos.components[i].ac_selector; /* FIXME: set to values specified in SOS */ + slice_param.components[i].component_selector = priv->cur_sos.components[i].component_id; /* FIXME: set to values specified in SOS */ + slice_param.components[i].dc_table_selector = priv->cur_sos.components[i].dc_selector; /* FIXME: set to values specified in SOS */ + slice_param.components[i].ac_table_selector = priv->cur_sos.components[i].ac_selector; /* FIXME: set to values specified in SOS */ } slice_param.restart_interval = priv->restart_interval; slice_param.num_mcus = ((priv->width+max_h_factor*8-1)/(max_h_factor*8))* ((priv->height+max_v_factor*8-1)/(max_v_factor*8)); // ?? 720/16? va_status = vaCreateBuffer(va_dpy, context_id, - VASliceParameterBufferType, // VASliceParameterBufferJPEG? - sizeof(VASliceParameterBufferJPEG), + VASliceParameterBufferType, // VASliceParameterBufferJPEGBaseline? + sizeof(VASliceParameterBufferJPEGBaseline), 1, &slice_param, &slice_param_buf); CHECK_VASTATUS(va_status, "vaCreateBuffer"); diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/decode/tinyjpeg-internal.h libva-1.1.1.pre1~git20120727.8b2835e/test/decode/tinyjpeg-internal.h --- libva-1.1.1.pre1~git20120529.90460bb/test/decode/tinyjpeg-internal.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/decode/tinyjpeg-internal.h 2012-07-30 07:20:35.000000000 +0000 @@ -106,8 +106,11 @@ struct component component_infos[COMPONENTS]; unsigned int nf_components; unsigned char Q_tables[COMPONENTS][64]; /* quantization tables, zigzag*/ + unsigned char Q_tables_valid[COMPONENTS]; struct huffman_table HTDC[HUFFMAN_TABLES]; /* DC huffman tables */ + unsigned char HTDC_valid[HUFFMAN_TABLES]; struct huffman_table HTAC[HUFFMAN_TABLES]; /* AC huffman tables */ + unsigned char HTAC_valid[HUFFMAN_TABLES]; struct jpeg_sos cur_sos; /* current sos values*/ int default_huffman_table_initialized; int restart_interval; diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/egl/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/test/egl/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/test/egl/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/egl/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,25 @@ +# Copyright (c) 2012 Intel Corporation. All Rights Reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sub license, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice (including the +# next paragraph) shall be included in all copies or substantial portions +# of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + bin_PROGRAMS = va_egl INCLUDES = -I$(top_srcdir) \ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/egl/va_egl_x11.c libva-1.1.1.pre1~git20120727.8b2835e/test/egl/va_egl_x11.c --- libva-1.1.1.pre1~git20120529.90460bb/test/egl/va_egl_x11.c 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/egl/va_egl_x11.c 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,27 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + #include #include #include diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/encode/avcenc.c libva-1.1.1.pre1~git20120727.8b2835e/test/encode/avcenc.c --- libva-1.1.1.pre1~git20120529.90460bb/test/encode/avcenc.c 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/encode/avcenc.c 2012-07-30 07:20:35.000000000 +0000 @@ -1,4 +1,27 @@ /* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +/* * Simple AVC encoder based on libVA. * * Usage: diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/v4l_h264/decode/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/test/v4l_h264/decode/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/test/v4l_h264/decode/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/v4l_h264/decode/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -35,3 +35,7 @@ for a in $(bin_PROGRAMS); do \ valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ done + +EXTRA_DIST = \ + TCPSocketServer.h \ + $(NULL) diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/v4l_h264/encode/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/test/v4l_h264/encode/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/test/v4l_h264/encode/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/v4l_h264/encode/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -35,3 +35,7 @@ for a in $(bin_PROGRAMS); do \ valgrind --leak-check=full --show-reachable=yes .libs/$$a; \ done + +EXTRA_DIST = \ + TCPSocketClient.h \ + $(NULL) diff -Nru libva-1.1.1.pre1~git20120529.90460bb/test/v4l_h264/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/test/v4l_h264/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/test/v4l_h264/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/test/v4l_h264/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -21,3 +21,7 @@ # USE OR OTHER DEALINGS IN THE SOFTWARE. SUBDIRS = encode decode + +EXTRA_DIST = \ + README.txt \ + $(NULL) diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/egl/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/va/egl/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/va/egl/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/egl/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -20,7 +20,12 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -INCLUDES = -DLINUX -I$(top_srcdir) -I$(top_srcdir)/va $(EGL_DEPS_CFLAGS) +INCLUDES = \ + -DLINUX \ + -I$(top_srcdir) \ + -I$(top_srcdir)/va \ + $(EGL_DEPS_CFLAGS) \ + $(NULL) source_c = \ va_egl.c \ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/egl/va_egl_impl.c libva-1.1.1.pre1~git20120727.8b2835e/va/egl/va_egl_impl.c --- libva-1.1.1.pre1~git20120529.90460bb/va/egl/va_egl_impl.c 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/egl/va_egl_impl.c 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,27 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + #define _GNU_SOURCE 1 #include #include diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/egl/va_egl_impl.h libva-1.1.1.pre1~git20120727.8b2835e/va/egl/va_egl_impl.h --- libva-1.1.1.pre1~git20120529.90460bb/va/egl/va_egl_impl.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/egl/va_egl_impl.h 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #ifndef _VA_EGL_IMPL_H_ #define _VA_EGL_IMPL_H_ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/egl/va_egl_private.h libva-1.1.1.pre1~git20120727.8b2835e/va/egl/va_egl_private.h --- libva-1.1.1.pre1~git20120529.90460bb/va/egl/va_egl_private.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/egl/va_egl_private.h 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #ifndef _VA_EGL_PRIVATE_H_ #define _VA_EGL_PRIVATE_H_ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/glx/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/va/glx/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/va/glx/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/glx/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -20,7 +20,14 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -INCLUDES = -DLINUX -I$(top_srcdir) -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 +INCLUDES = \ + -DLINUX \ + -I$(top_srcdir) \ + -I$(top_srcdir)/va \ + -I$(top_srcdir)/va/x11 \ + $(X11_CFLAGS) \ + $(GL_DEPS_CFLAGS) \ + $(NULL) source_c = \ va_glx.c \ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/va/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/va/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -41,6 +41,7 @@ va.h \ va_backend.h \ va_backend_tpi.h \ + va_dec_jpeg.h \ va_dummy.h \ va_tpi.h \ va_version.h \ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/va_android.h libva-1.1.1.pre1~git20120727.8b2835e/va/va_android.h --- libva-1.1.1.pre1~git20120529.90460bb/va/va_android.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/va_android.h 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #ifndef _VA_ANDROID_H_ #define _VA_ANDROID_H_ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/va_dec_jpeg.h libva-1.1.1.pre1~git20120727.8b2835e/va/va_dec_jpeg.h --- libva-1.1.1.pre1~git20120529.90460bb/va/va_dec_jpeg.h 1970-01-01 00:00:00.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/va_dec_jpeg.h 2012-07-30 07:20:35.000000000 +0000 @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2007-2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file va_dec_jpeg.h + * \brief The JPEG decoding API + * + * This file contains the \ref api_dec_jpeg "JPEG decoding API". + */ + +#ifndef VA_DEC_JPEG_H +#define VA_DEC_JPEG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/** + * \defgroup api_dec_jpeg JPEG decoding API + * + * This JPEG decoding API supports Baseline profile only. + * + * @{ + */ + +/** + * \brief Picture parameter for JPEG decoding. + * + * This structure holds information from the frame header, along with + * definitions from additional segments. + */ +typedef struct _VAPictureParameterBufferJPEGBaseline { + /** \brief Picture width in pixels. */ + unsigned short picture_width; + /** \brief Picture height in pixels. */ + unsigned short picture_height; + + struct { + /** \brief Component identifier (Ci). */ + unsigned char component_id; + /** \brief Horizontal sampling factor (Hi). */ + unsigned char h_sampling_factor; + /** \brief Vertical sampling factor (Vi). */ + unsigned char v_sampling_factor; + /* \brief Quantization table selector (Tqi). */ + unsigned char quantiser_table_selector; + } components[255]; + /** \brief Number of components in frame (Nf). */ + unsigned char num_components; +} VAPictureParameterBufferJPEGBaseline; + +/** + * \brief Quantization table for JPEG decoding. + * + * This structure holds the complete quantization tables. This is an + * aggregation of all quantization table (DQT) segments maintained by + * the application. i.e. up to 4 quantization tables are stored in + * there for baseline profile. + * + * The #load_quantization_table array can be used as a hint to notify + * the VA driver implementation about which table(s) actually changed + * since the last submission of this buffer. + */ +typedef struct _VAIQMatrixBufferJPEGBaseline { + /** \brief Specifies which #quantiser_table is valid. */ + unsigned char load_quantiser_table[4]; + /** \brief Quanziation tables indexed by table identifier (Tqi). */ + unsigned char quantiser_table[4][64]; +} VAIQMatrixBufferJPEGBaseline; + +/** + * \brief Huffman table for JPEG decoding. + * + * This structure holds the complete Huffman tables. This is an + * aggregation of all Huffman table (DHT) segments maintained by the + * application. i.e. up to 2 Huffman tables are stored in there for + * baseline profile. + * + * The #load_huffman_table array can be used as a hint to notify the + * VA driver implementation about which table(s) actually changed + * since the last submission of this buffer. + */ +typedef struct _VAHuffmanTableBufferJPEGBaseline { + /** \brief Specifies which #huffman_table is valid. */ + unsigned char load_huffman_table[2]; + /** \brief Huffman tables indexed by table identifier (Th). */ + struct { + /** @name DC table (up to 12 categories) */ + /**@{*/ + /** \brief Number of Huffman codes of length i + 1 (Li). */ + unsigned char num_dc_codes[16]; + /** \brief Value associated with each Huffman code (Vij). */ + unsigned char dc_values[12]; + /**@}*/ + /** @name AC table (2 special codes + up to 16 * 10 codes) */ + /**@{*/ + /** \brief Number of Huffman codes of length i + 1 (Li). */ + unsigned char num_ac_codes[16]; + /** \brief Value associated with each Huffman code (Vij). */ + unsigned char ac_values[162]; + /**@}*/ + } huffman_table[2]; +} VAHuffmanTableBufferJPEGBaseline; + +/** + * \brief Slice parameter for JPEG decoding. + * + * This structure holds information from the scan header, along with + * definitions from additional segments. The associated slice data + * buffer holds all entropy coded segments (ECS) in the scan. + */ +typedef struct _VASliceParameterBufferJPEGBaseline { + /** @name Codec-independent Slice Parameter Buffer base. */ + /**@{*/ + /** \brief Number of bytes in the slice data buffer for this slice. */ + unsigned int slice_data_size; + /** \brief The offset to the first byte of the first MCU. */ + unsigned int slice_data_offset; + /** \brief Slice data buffer flags. See \c VA_SLICE_DATA_FLAG_xxx. */ + unsigned int slice_data_flag; + /**@}*/ + + /** \brief Scan horizontal position. */ + unsigned int slice_horizontal_position; + /** \brief Scan vertical position. */ + unsigned int slice_vertical_position; + + struct { + /** \brief Scan component selector (Csj). */ + unsigned char component_selector; + /** \brief DC entropy coding table selector (Tdj). */ + unsigned char dc_table_selector; + /** \brief AC entropy coding table selector (Taj). */ + unsigned char ac_table_selector; + } components[4]; + /** \brief Number of components in scan (Ns). */ + unsigned char num_components; + + /** \brief Restart interval definition (Ri). */ + unsigned short restart_interval; + /** \brief Number of MCUs in a scan. */ + unsigned int num_mcus; +} VASliceParameterBufferJPEGBaseline; + +/**@}*/ + +#ifdef __cplusplus +} +#endif + +#endif /* VA_DEC_JPEG_H */ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/va_dummy.h libva-1.1.1.pre1~git20120727.8b2835e/va/va_dummy.h --- libva-1.1.1.pre1~git20120529.90460bb/va/va_dummy.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/va_dummy.h 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #ifndef _VA_ANDROID_H_ #define _VA_ANDROID_H_ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/va_egl.h libva-1.1.1.pre1~git20120727.8b2835e/va/va_egl.h --- libva-1.1.1.pre1~git20120529.90460bb/va/va_egl.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/va_egl.h 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #ifndef _VA_EGL_H_ #define _VA_EGL_H_ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/va.h libva-1.1.1.pre1~git20120727.8b2835e/va/va.h --- libva-1.1.1.pre1~git20120529.90460bb/va/va.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/va.h 2012-07-30 07:20:35.000000000 +0000 @@ -631,94 +631,7 @@ VABufferID coded_buf; } VAEncPictureParameterBufferJPEG; -/* data struct for JPEG decoding */ - -/* Quantization table */ -typedef struct _VAIQMatrixBufferJPEG -{ - int precision[4]; /* valid value: 0(8-bits) , 1(16-bits), precision[Tq](Tq=0,1,2,3) - * specifies precision for destination Tq - */ - unsigned char quantiser_matrix[4][128]; /* quantiser_matrix[Tq](Tq=0,1,2,3) specifies a - * quantization table for destination Tq in zig-zag - * scan order. Only the first 64 bytes are valid for each - * table if precision is 0(8-bits). - */ -} VAIQMatrixBufferJPEG; - -#define VA_JPEG_SOF0 0xC0 -#define VA_JPEG_SOF1 0xC1 -#define VA_JPEG_SOF2 0xC2 -#define VA_JPEG_SOF3 0xC3 -#define VA_JPEG_SOF5 0xC5 -#define VA_JPEG_SOF6 0xC6 -#define VA_JPEG_SOF7 0xC7 -#define VA_JPEG_SOF9 0xC9 -#define VA_JPEG_SOF10 0xCA -#define VA_JPEG_SOF11 0xCB -#define VA_JPEG_SOF13 0xCD -#define VA_JPEG_SOF14 0xCE - -/* JPEG Picture Parameter Buffer */ -typedef struct _VAPictureParameterBufferJPEG -{ - unsigned int type; /* SOFn */ - unsigned int sample_precision; - unsigned int image_width; - unsigned int image_height; - unsigned int num_components; - struct { - unsigned char component_id; /* Ci, the range is 0-255, see B.2.2 */ - unsigned char h_sampling_factor; - unsigned char v_sampling_factor; - unsigned char quantiser_table_selector; /* Tqi, quantization table destination selector */ - } components[4]; - - /* ROI (region of interest), for JPEG2000 */ - struct { - int enabled; - int start_x; - int start_y; - int end_x; - int end_y; - } roi; - - int rotation; -} VAPictureParameterBufferJPEG; - -typedef struct _VAHuffmanTableBufferJPEG -{ - struct { - unsigned char dc_bits[16]; /* Number of Huffman codes of length i for DC */ - unsigned char dc_huffval[20]; /* Value associated with each Huffman code for DC */ - unsigned char ac_bits[16]; /* Number of Huffman codes of length i for AC */ - unsigned char ac_huffval[256]; /* Value associated with each Huffman code for AC */ - } huffman_table[4]; /* Up to 4 huffman tables, huffman_table[Th](Th=0,1,2,3) - * specifies a buffman table for destination Th. - */ - -} VAHuffmanTableBufferJPEG; - -/* JPEG Scan Parameter Buffer, The Scan of is similar to - * the Slice of other codecs */ -typedef struct _VASliceParameterBufferJPEG -{ - unsigned int slice_data_size; /* number of bytes in the slice data buffer for this slice */ - unsigned int slice_data_offset; /* the offset to the first byte of slice data */ - unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX definitions */ - unsigned int slice_horizontal_position; - unsigned int slice_vertical_position; - - unsigned int num_components; - struct { - int component_id; /* Csj, it must match one of component_ids specified in VAPictureParameterBufferJPEG */ - int dc_selector; /* Tdj(0,1,2,3) */ - int ac_selector; /* Taj(0,1,2,3) */ - } components[4]; - - int restart_interval; /* specifies the number of MCUs in restart interval, defined in DRI marker */ - int num_mcus; /* indicates the number of MCUs in a scan */ -} VASliceParameterBufferJPEG; +#include /**************************** * MPEG-2 data structures diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/va_x11.h libva-1.1.1.pre1~git20120727.8b2835e/va/va_x11.h --- libva-1.1.1.pre1~git20120529.90460bb/va/va_x11.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/va_x11.h 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #ifndef _VA_X11_H_ #define _VA_X11_H_ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/x11/dri2_util.c libva-1.1.1.pre1~git20120727.8b2835e/va/x11/dri2_util.c --- libva-1.1.1.pre1~git20120529.90460bb/va/x11/dri2_util.c 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/x11/dri2_util.c 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #include #include #include diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/x11/Makefile.am libva-1.1.1.pre1~git20120727.8b2835e/va/x11/Makefile.am --- libva-1.1.1.pre1~git20120529.90460bb/va/x11/Makefile.am 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/x11/Makefile.am 2012-07-30 07:20:35.000000000 +0000 @@ -20,7 +20,13 @@ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -INCLUDES = -DLINUX -I$(top_srcdir) -I$(top_srcdir)/va $(DRM_CFLAGS) +INCLUDES = \ + -DLINUX \ + -I$(top_srcdir) \ + -I$(top_srcdir)/va \ + $(X11_CFLAGS) \ + $(DRM_CFLAGS) \ + $(NULL) source_c = \ dri2_util.c \ diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/x11/va_dricommon.c libva-1.1.1.pre1~git20120727.8b2835e/va/x11/va_dricommon.c --- libva-1.1.1.pre1~git20120529.90460bb/va/x11/va_dricommon.c 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/x11/va_dricommon.c 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #include "va_dricommon.h" // X error trap diff -Nru libva-1.1.1.pre1~git20120529.90460bb/va/x11/va_dricommon.h libva-1.1.1.pre1~git20120727.8b2835e/va/x11/va_dricommon.h --- libva-1.1.1.pre1~git20120529.90460bb/va/x11/va_dricommon.h 2012-06-15 06:29:35.000000000 +0000 +++ libva-1.1.1.pre1~git20120727.8b2835e/va/x11/va_dricommon.h 2012-07-30 07:20:35.000000000 +0000 @@ -1,3 +1,26 @@ +/* + * Copyright (c) 2012 Intel Corporation. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ #ifndef _VA_DRICOMMON_H_ #define _VA_DRICOMMON_H_