Skip to content

Commit

Permalink
libva-1.0.6
Browse files Browse the repository at this point in the history
 1) Refinement for VA_TRACE, new LIBVA_FOOL, see the description in va_trace.c/va_fool.c
 2) vaPutSurface flag VA_ENABLE_BLEND to blend the surface with a color
 3) libva.spec for RPM package
 4) Update VAAPI for dynamic bit rate control/AIR/maximum slice size ctrl
 5) Added VA_STATUS_ERROR_DECODING/ENCODING_ERROR to report decode/encode error
 6) Add config.h/va_vesion.h for Android
 7) Update "vainfo.c" for Android

Signed-off-by: Austin Yuan <[email protected]>
Signed-off-by: Binglin Chen <[email protected]>
Signed-off-by: Fei Jiang <[email protected]>
Signed-off-by: Elaine Wang <[email protected]>
Signed-off-by: Ren Zhaohan <[email protected]>
Signed-off-by: Jerry Dong <[email protected]>

Signed-off-by: Austin Yuan <[email protected]>
  • Loading branch information
Austin Yuan committed Oct 27, 2010
1 parent 6c37203 commit 881b49c
Show file tree
Hide file tree
Showing 14 changed files with 1,396 additions and 509 deletions.
2 changes: 2 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Recursive call sub-folder Android.mk
#
# include $(call all-subdir-makefiles)
LOCAL_PATH := $(my-dir)

include $(LOCAL_PATH)/va/Android.mk

4 changes: 2 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
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.
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# 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.
Expand All @@ -29,7 +29,7 @@ m4_define([libva_version],
[libva_major_version.libva_minor_version.libva_micro_version])

# if the library source code has changed, increment revision
m4_define([libva_lt_revision], [5])
m4_define([libva_lt_revision], [6])
# if any interface was added/removed/changed, then inc current, reset revision
m4_define([libva_lt_current], [1])
# if any interface was added since last public release, then increment age
Expand Down
2 changes: 1 addition & 1 deletion dummy_drv_video/dummy_drv_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ VAStatus dummy_PutSurface(
Drawable drawable = (Drawable)draw;

(void)drawable;

return VA_STATUS_ERROR_UNKNOWN;
}

Expand Down
9 changes: 9 additions & 0 deletions test/vainfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#ifndef ANDROID
#include <va/va_x11.h>
#else
#include "va/va_android.h"
#define Display unsigned int
#endif

#include <stdarg.h>
#include <stdio.h>
Expand Down Expand Up @@ -87,7 +92,11 @@ int main(int argc, const char* argv[])
else
name = argv[0];

#ifndef ANDROID
dpy = XOpenDisplay(":0.0");
#else
dpy = (Display*)malloc(sizeof(Display));
#endif
if (NULL == dpy)
{
fprintf(stderr, "%s: Error, can't open display: '%s'\n", name, display ? display : "");
Expand Down
1 change: 1 addition & 0 deletions va/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
va.c \
va_trace.c \
va_fool.c

LOCAL_CFLAGS += \
-DANDROID \
Expand Down
2 changes: 1 addition & 1 deletion va/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ INCLUDES = \
LDADD = \
$(LIBVA_LT_LDFLAGS)

libva_la_SOURCES = va.c va_trace.c
libva_la_SOURCES = va.c va_trace.c va_fool.c
libva_ladir = $(libdir)
libva_la_LDFLAGS = $(LDADD) -no-undefined
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
Expand Down
37 changes: 36 additions & 1 deletion va/android/va_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ VADisplay vaGetDisplay (
pDisplayContext->vaDestroy = va_DisplayContextDestroy;
pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName;
pDisplayContexts = pDisplayContext;
pDriverContext->dri_state = dri_state;
pDriverContext->dri_state = dri_state;
dpy = (VADisplay)pDisplayContext;
}
else
Expand All @@ -272,6 +272,33 @@ VADisplay vaGetDisplay (


#ifdef ANDROID
extern "C" {
extern int fool_postp; /* do nothing for vaPutSurface if set */
extern int trace_flag; /* trace vaPutSurface parameters */

void va_TracePutSurface (
VADisplay dpy,
VASurfaceID surface,
void *draw, /* the target Drawable */
short srcx,
short srcy,
unsigned short srcw,
unsigned short srch,
short destx,
short desty,
unsigned short destw,
unsigned short desth,
VARectangle *cliprects, /* client supplied clip list */
unsigned int number_cliprects, /* number of clip rects in the clip list */
unsigned int flags /* de-interlacing flags */
);
}

#define VA_TRACE(trace_func,...) \
if (trace_flag) { \
trace_func(__VA_ARGS__); \
}

VAStatus vaPutSurface (
VADisplay dpy,
VASurfaceID surface,
Expand All @@ -291,8 +318,16 @@ VAStatus vaPutSurface (
{
VADriverContextP ctx;

if (fool_postp)
return VA_STATUS_SUCCESS;

CHECK_DISPLAY(dpy);
ctx = CTX(dpy);

VA_TRACE(va_TracePutSurface, dpy, surface, static_cast<void*>(&draw), srcx, srcy, srcw, srch,
destx, desty, destw, desth,
cliprects, number_cliprects, flags );

return ctx->vtable.vaPutSurface( ctx, surface, static_cast<void*>(&draw), srcx, srcy, srcw, srch,
destx, desty, destw, desth,
cliprects, number_cliprects, flags );
Expand Down
Loading

0 comments on commit 881b49c

Please sign in to comment.