Commit Graph

440 Commits

Author SHA1 Message Date
José Fonseca 2737abb44e gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center.
Squashed commit of the following:

commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852
Author: José Fonseca <jfonseca@vmware.com>
Date:   Tue Apr 23 17:37:18 2013 +0100

    gallium: s/lower_left_origin/bottom_edge_rule/

commit 4dff4f64fa83b9737def136fffd161d55e4f1722
Author: José Fonseca <jfonseca@vmware.com>
Date:   Tue Apr 23 17:35:04 2013 +0100

    gallium: Move diagram to docs.

commit 442a63012c8c3c3797f45e03f2ca20ad5f399832
Author: James Benton <jbenton@vmware.com>
Date:   Fri May 11 17:50:55 2012 +0100

    gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center.

    This change is necessary to achieve correct results when using OpenGL
    FBOs.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-04-23 19:42:47 +01:00
Vinson Lee f6487e8911 vl: Fix off-by-one error in device_name_length allocation.
Fixes out-of-bounds write reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
2013-02-23 14:57:05 -08:00
Maarten Lankhorst 3a91e7955a vl: round next_msc to integer frame, and kill skew_msc
This reduces jitter slightly in a cleaner way, without desynchronizing mplayer2 as badly
when falling behind.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-01-21 23:49:56 +01:00
Maarten Lankhorst 4b8af72f96 vl/video_buffer: fix up surface ordering for the interlaced case
It seems the other code expects surface[0..1] to be the luma field in interlaced case.

See for example vdpau/surface.c vlVdpVideoSurfaceClear and vlVdpVideoSurfacePutBitsYCbCr.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2013-01-16 17:22:55 +01:00
Maarten Lankhorst 892c1fa8d8 vl/compositor: fix weave shader bugs
Writemask was XY instead of YZ (thanks to calim for spotting it).

The pixel calculation resulted in the pixel always being off by one.
If y was .5:

y' = round(y) + 0.5 = 1.5

Fixing this also means the LRP function has to swap the pixels it, since
it's now the other way around for top/bottom.

WIth these fixes only chroma for top and bottom pixel rows are wrongly interpolated
in my test program:

--- nvidia
+++ nouveau
@@ -1,4 +1,4 @@
-YCbCr[0] = 00c080
+YCbCr[0] = 00b070
 YCbCr[1] = 00b070
 YCbCr[2] = 029050
 YCbCr[3] = 207050
@@ -61,4 +61,4 @@
 YCbCr[60] = 0c5070
 YCbCr[61] = c05090
 YCbCr[62] = 0e70b0
-YCbCr[63] = e080c0
+YCbCr[63] = e070b0

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-01-16 17:22:45 +01:00
Marek Olšák 25409c6da8 gallium: remove pipe_surface::usage
Not really used by anybody now.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-12-12 13:09:54 +01:00
Marek Olšák e73bf3b805 gallium: add start_slot parameter to set_vertex_buffers
This allows updating only a subrange of buffer bindings.

set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that
range. Binding NULL resources unbinds buffers too (both buffer and user_buffer
must be NULL).

The meta ops are adapted to only save, change, and restore the single slot
they use. The cso_context can save and restore only one vertex buffer slot.
The clients can query which one it is using cso_get_aux_vertex_buffer_slot.
It's currently set to 0. (the Draw module breaks if it's set to non-zero)

It should decrease the CPU overhead when using a lot of meta ops, but
the drivers must be able to treat each vertex buffer slot as a separate
state (only r600g does so at the moment).

I can imagine this also being useful for optimizing some OpenGL use cases.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-31 00:55:13 +01:00
Christian König 59d4bc8c48 vl: fix the dri winsys helper screen init
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-10-26 09:53:04 +02:00
Marek Olšák 369e468889 gallium: unify transfer functions
"get_transfer + transfer_map" becomes "transfer_map".
"transfer_unmap + transfer_destroy" becomes "transfer_unmap".

transfer_map must create and return the transfer object and transfer_unmap
must destroy it.

transfer_map is successful if the returned buffer pointer is not NULL.
If transfer_map fails, the pointer to the transfer object remains unchanged
(i.e. doesn't have to be NULL).

Acked-by: Brian Paul <brianp@vmware.com>
2012-10-11 21:12:16 +02:00
Vinson Lee 599140119e vl: Initialize pipe_vertex_buffer.user_buffer fields.
Fix uninitialized scalar variable defects reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2012-05-14 08:44:16 -07:00
Marek Olšák 507337864f gallium: change set_constant_buffer to be UBO-friendly 2012-04-30 01:09:57 +02:00
Christian König fc0a5e21d7 vl: move winsys helper out of winsys directory
They aren't winsys of their own,
just help dealing with them.

v2: add some more comments in vl_winsys.h

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-28 15:47:41 +02:00
Christian König 85dbb22796 vl/mpeg12: make bitstream decoder more robust
Just another xine workaround.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-09 12:44:51 +01:00
Christian König 7236f170e4 vl/video_buffer: add YUYV and UYVY support
This gets xine working with VDPAU.

v2: some minor bugfixes.
v3: create the resource with the subsampled
    format to avoid tilling problems

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-09 12:44:04 +01:00
Christian König ac1dd440b8 vl/video_buffer: add YUVA and VUYA support
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-08 11:37:02 +01:00
Christian König 95594bae47 vl: fix shader in/out numbering
Fix all the other wrong numberings.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-03 10:53:07 +01:00
Christian König a9073e3486 vl/compositor: fix shader in/out numbering
Michel pointed out that my assumption of a global
index namespace is incorrect and breaks r300g.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-02 16:07:18 +01:00
Christian König 14766f8200 vl/csc: simplify matrix handling
A csc matrix is only 4x3 not 4x4, also define a VDPAU compatible type for it.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-02 13:14:21 +01:00
Christian König 74a4e90894 vl/compositor: add support for per layer dst areas
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-02 13:14:21 +01:00
Christian König b90727bb24 vl/compositor: add per vertex color suport
Used in subtitles, for example.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-02 13:14:21 +01:00
Christian König d645dc65b6 vl/compositor: replace pipe_video_rect with u_rect
So we support things like flipping also.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-02 13:14:21 +01:00
Christian König 32c4381d4a vl/compositor: split shaders and state
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-02 13:14:20 +01:00
Christian König 20be286709 vl: adjust matrix and median filter to removal of PIPE_SHADER_CAP_OUTPUT_READ
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-27 12:53:49 +01:00
Christian König 2a97a00e28 vl/compositor: fix a simple typo
Otherwise the dirty area tracking won't work correctly.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-25 12:14:58 +01:00
Christian König 37f97e1753 vl: add support for bob deinterlacing
v2: return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE
    for unknown picture structure.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-21 11:13:27 +01:00
Christian König 553e820387 vl: fix low strength denoise filter
A filter strength of zero or one doesn't make any
sense. Thanks to Andy Furniss for pointing this out.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-14 22:31:29 +01:00
Christian König d7db6343dd vl: add a matrix/convolution filter
Can be used for gaussian, mean, laplacian, emboss, sharpness...

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-10 12:09:27 +01:00
Christian König a9ffcceee9 vl: add a median filter for noise reduction
This is a shader based median filter, generally
used for noise reduction, it could still need some
improvements, but should usually work out of the box.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-10 12:06:00 +01:00
Christian König 9001682846 vl: add VL_MAX_SURFACES define
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-06 10:35:59 +01:00
Christian König 8abbdb8865 vl: rename VL_MAX_PLANES to VL_NUM_COMPONENTS
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-06 10:35:59 +01:00
Christian König 70a7695b4d vl: prefix size defines with VL_
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-06 10:35:59 +01:00
Christian König 3841d3fd13 vl: add a simple weave deinterlacer
Well it's not so simple, since it does
deinterlacing and scaling at the same time.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-06 10:35:05 +01:00
Christian König 9f9628c72b vl/video_buffer: fix interlaced surface ordering
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-06 10:34:57 +01:00
Christian König 4ccae0dfaa vl/video_buffer: fix height of interlaced video buffers
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-06 10:34:57 +01:00
José Fonseca 455090c4c4 vl: Make array initialization portable.
Should fix MSVC build.
2012-01-16 12:21:40 +00:00
Christian König 2eabd05b75 vl: fix YV12 handling
We actually implemented YV21 instead of YV12, so fix the plane ordering.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-15 12:40:44 +01:00
Christian König 8ea416f35d vl: move away from state like parameters
Again based on Maartens work, but keep begin_frame
and end_frame functions for now.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-15 12:40:44 +01:00
Christian König 9af70c90db vl/video_buffer: add support for interlaced buffers
Add the infrastructure, but not the decode implementation.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-15 12:40:44 +01:00
Christian König 12b49ca2df vl/video_buffer: improve constructor
Add a second extened constructor that takes plane
textures for the video buffer. Also provide a
function for texture templates.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-15 12:40:44 +01:00
Christian König e027759336 vl/video_buffer: use template style create params
Just like in the rest of gallium, this reduces the
number of parameters significantly.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-15 12:40:44 +01:00
Marek Olšák dc4c821f08 Squash-merge branch 'gallium-clip-state'
Conflicts:
	src/gallium/auxiliary/tgsi/tgsi_strings.c
	src/mesa/state_tracker/st_atom_clip.c

commit d919791f2742e913173d6b335128e7d4c63c0840
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Fri Jan 6 17:59:22 2012 +0100

    d3d1x: adapt to new clip state

commit cfec82bca3fefcdefafca3f4555285ec1d1ae421
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Fri Jan 6 14:16:51 2012 +0100

    gallium/docs: update for clip state changes

commit c02bfeb81ad9f62041a2285ea6373bbbd602912a
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Fri Jan 6 14:21:43 2012 +0100

    tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS

commit d4e0a785a6a23ad2f6819fd72e236acb9750028d
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Jan 5 08:30:00 2012 -0700

    tgsi: consolidate TGSI string arrays in new tgsi_strings.h

    There was some duplication between the tgsi_dump.c and tgsi_text.c
    files.  Also use some static assertions to help catch errors when
    adding new TGSI values.

    v2: put strings in tgsi_strings.c file instead of the .h file.

    Reviewed-by: Dave Airlie <airlied@redhat.com>

commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Fri Jan 6 12:48:09 2012 +0100

    gallium: extend user_clip_plane_enable to apply to clip distances

commit f1d5016c07f786229ed057effbe55fbfd160b019
Author: Marek Olšák <maraeo@gmail.com>
Date:   Fri Jan 6 02:39:09 2012 +0100

    nvfx: adapt to new clip state

commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24
Author: Marek Olšák <maraeo@gmail.com>
Date:   Fri Jan 6 01:41:39 2012 +0100

    st/mesa: fix DrawPixels with GL_DEPTH_CLAMP

commit c86ad730aa1c017788ae88a55f54071bf222be12
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Tue Jan 3 23:51:30 2012 +0100

    nv50: adapt to new clip state

commit 3a8ae6ac243bae5970729dc4057fe02d992543dc
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Tue Jan 3 23:32:36 2012 +0100

    nvc0: adapt to new clip state

commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11
Author: Marek Olšák <maraeo@gmail.com>
Date:   Thu Dec 29 01:32:51 2011 +0100

    draw: initalize pt.user.planes in draw_init

    This fixes a crash in glean/fpexceptions.

commit e3056524b19b56d473f4faff84ffa0eb41497408
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Dec 26 06:26:55 2011 +0100

    svga: adapt to new clip state

commit c5bfa8b37d6d489271df457229081d6bbb51b4b7
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 25 14:11:51 2011 +0100

    r600g: adapt to new clip state

commit f11890905362f62627c4a28a8255b76eb7de7df2
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 25 14:10:26 2011 +0100

    r300g: adapt to new clip state

commit e37465327c79a01112f15f6278d9accc5bf3103f
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 25 12:39:16 2011 +0100

    draw: adapt to new clip state

    This adds a regression in the LLVM clipping path. Can anybody see anything
    wrong with the code? It works for every other case, just glean/fpexceptions
    crashes when doing the "Infinite clip plane test".

commit b474d2b18c72d965eefae4e427c269cba5ce6ba2
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 25 13:14:59 2011 +0100

    u_blitter: don't save/set/restore clip state

commit 9dd240ea91f523a677af45e8d0adb9e661e28602
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 25 13:11:56 2011 +0100

    gallium: don't cso_save/set/restore clip state

    The enable bits are in the rasterizer state.

commit a4f7031179f5f4ad524b34b394214b984ac950f6
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 25 12:58:55 2011 +0100

    gallium: default depth_clip to 1

    depth_clip = !depth_clamp

commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Dec 26 06:14:19 2011 +0100

    trace,util: update state logging to new clip state

    Also dump the other missing flags.

commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Dec 25 10:43:43 2011 +0100

    st/mesa: adapt to new clip state

commit b7b656a42fca19d7c85267f42649a206a85a2c72
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sat Dec 17 15:45:19 2011 +0100

    gallium: move state enable bits from clip_state to rasterizer_state
2012-01-10 00:25:05 +01:00
Christian König 8c2bfa34a0 vl: replace decode_buffers with auxiliary data field
Based on patches from Maarten Lankhorst <m.b.lankhorst@gmail.com>

Signed-off-by: Christian König <deathsimple@vodafone.de>
Acked-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2012-01-09 12:21:22 +01:00
Marek Olšák 7cd1c62b6b gallium: remove deprecated PIPE_TRANSFER_DISCARD
PIPE_TRANSFER_DISCARD_RANGE is defined the same.
2012-01-05 18:29:11 +01:00
Christian König 7b181d16c3 vl/mpeg2: simple fix to get xine running again
Otherwise xines xxmc plugin will just display green blocks.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-04 16:01:09 +01:00
Christian König bce506ffc0 vl: seperate shader buffers from components
Buffers for shader based decoding can now be
released without its component still being around.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Acked-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2012-01-02 12:47:15 +01:00
Christian König 7ac114f94a vl: call decode_bitstream only once
Submit all bitstreams at once to decode_bitstream.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-12-26 16:37:47 +01:00
Maarten Lankhorst 1fdecef886 vl: Fix inverted logic in vlc checks
Reported-by: Andy Furniss <andyqos@ukfsn.org>
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-12-24 15:36:46 +01:00
Maarten Lankhorst efa93ae449 vl: improve vlc functions and handling
Only initialize vlc in MPEG2 decoding once for all slices,
add more sanity checks to vlc decoding functions, support
multiple vlc input buffer, improve documentation of the
vlc functions.

v2: also implement multiple inputs for the vlc functions
v3: some bug fixes for buffer size and alignment corner cases
v4: rework of the patch, some more improvements

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-23 16:31:26 +01:00
Maarten Lankhorst 68651c3243 vl: Remove unused declaration
csc is not used for rgba and gives a warning.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-20 13:12:39 +01:00
Maarten Lankhorst 72325ee6e3 vl: Use pipe clear_render_target instead of util_clear_render_target
Mapping to software and uploading again clearing is killing performance.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-20 13:05:49 +01:00
Christian König 167b1b32c5 g3dvl/compositor: improve dirty area handling
Take viewport and scissors into account and make
the dirty area a parameter instead of a member.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-12-14 14:19:41 +01:00
Vinson Lee adb7f1351e g3dvl: Fix memory leaks on error paths.
Fixes Coverity resource leak defect.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-05 22:09:03 -07:00
Maarten Lankhorst c9c6eec1c6 state_trackers/vdpau: Implement VdpGenerateCSCMatrix
With the smpte240 profile, which was missing.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2011-11-03 13:52:00 +01:00
Christian König 8a7e645c9b g3dvl: remove some stale variable increment
Incrementing "td" before initializing it is
pointless and just leads to an uninitialized
variable warning with MSVC.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-11-03 13:52:00 +01:00
Christian König 86f97f7dc0 g3dvl: Don't use SCALED types for iDCT
This should bring g3dvl back to work until we figured out
how SCALED types should really work.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-09-25 12:49:06 +02:00
Dave Airlie 6dd284f7c8 gallium: move clear paths from rgba to a pointer to a color union (v2)
This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values.

Notes:
1. the value is opaque.
2. only when the value is used should it be interpretered according to
the surface format it is going to be used with.
3. float clears on integer buffers and vice-versa are undefined.

v2: fixed up vega and graw, dropped hunks that shouldn't have been in
patch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-18 15:12:47 +01:00
Emeric Grange 82e8bf36d8 g3dvl: Add max_references parameter to vl_create_decoder()
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
2011-09-14 15:49:15 +02:00
Emeric Grange 42fddacaba g3dvl: Add get_clear_color capability
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
2011-09-14 15:49:15 +02:00
Emeric Grange 02e191cb6a g3dvl: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
2011-09-14 15:49:15 +02:00
Christian König 4f37636afb g3dvl: extend the functionality of the compositor
Prepares for vdpau menu overlay.
2011-09-01 19:20:46 +02:00
Kai Wasserbäch 19bcd21ed1 vl: Fix include style
As explained in the thread starting at [0], the internal include style
should be »#include "path/to/header.h"« for non-system includes.

[0]
<http://news.gmane.org/find-root.php?message_id=%3c4E5802BE.6020206%40vmware.com%3e>

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-08-29 08:02:54 -06:00
Christian König d4bbdbd038 g3dvl: Fix a bug not decoding the last 32-64 bits of an mpeg2 bitstream.
Another bug found by Andy Furniss.
2011-08-29 10:36:06 +02:00
Brian Paul e3b0e37766 g3dvl: use pointer_to_uintptr() to silence a cast warning 2011-08-26 14:16:20 -06:00
Brian Paul 005aea891e g3dvl: s/inline/INLINE/ to fix MSVC build 2011-08-26 08:24:01 -06:00
Brian Paul b59715b13a g3dvl: fix compilation failure on MSVC
I assume the intention of "mb = {}" was to zero-initialize it.
2011-08-26 08:11:50 -06:00
Christian König 9765dede75 g3dvl: Rewrite the mpeg 1&2 bitstream parser
Based on work of Maarten Lankhorst this time.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:35 +02:00
Christian König 31096e13f8 g3dvl: Use a single texture for luma and chroma data
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:35 +02:00
Christian König 2e62b30826 g3dvl: Rework the decoder interface part 5/5
Make setting the quant matrixes a generic interface.
Also removes setting the quant matrix from the XvMC interface

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König 835ea8480f g3dvl: Rework the decoder interface part 4/5
Make the picture_structure enum spec complient.
Also remove it from the compositor.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König d3770d6229 g3dvl: Rework the decoder interface part 3/5
Revert back to a macroblock based interface. The structure used
tries to keep as close to the spec as possible.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König 231fce7d63 g3dvl: Rework the decoder interface part 2/5
Implement PIPE_CAP_NUM_BUFFERS_DESIRED giving the decoder control over
the number of buffers a state tracker should allocate.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König 1d1d038c85 g3dvl: Rework the decoder interface part 1/5
First of all get ride of the decode_buffer structure, while still giving
the decoder the ability to organize it's buffers depending on the needs
of the state tracker.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Younes Manton <younes.m@gmail.com>
2011-08-26 12:10:34 +02:00
Christian König 4c84acc86f g3dvl: remove unused vs output from create_ref_vert_shader
The position of the quad vertex is calculated in calc_position,
so we don't need the output here any more.
2011-07-25 01:32:39 +02:00
Younes Manton a87afba505 Revert "g3dvl: Preserve previously rendered components for MC output."
This reverts commit b56daf71d2.

The bug is actually in softpipe's blend and writemask interaction.
2011-07-21 20:09:11 -04:00
Marek Olšák 2d960d3f4e g3dvl: remove unused vertex shader inputs
See also comments in the code.
2011-07-20 22:55:24 +02:00
Younes Manton b56daf71d2 g3dvl: Preserve previously rendered components for MC output.
Fixes xvmc-softpipe MC entrypoint, amongst others.
2011-07-20 13:52:45 -04:00
Younes Manton 8082816e27 g3dvl: Init/clean pipe fully when a shader-based decoder isn't used.
Fixes VDPAU CSC-only mode.
2011-07-20 13:52:45 -04:00
Christian König 0d082390d9 g3dvl: no need for flushing inside the compositor any more
Move that also inside the state tracker where needed.
2011-07-15 17:54:06 +02:00
Christian König 2cbf532ae1 g3dvl: correctly distinct dst area and clip area in the compositor
Otherwise xine won't scale correctly.
2011-07-15 17:36:02 +02:00
Christian König 13da00f07c g3dvl: change picture parameter of decode_bitstream to general version
Using pipe_mpeg12_picture_desc was unintentional here.
2011-07-15 10:22:51 +02:00
Vinson Lee 3cf22a0c6e g3dvl: Remove non-constant expression array initializers.
The array initializer must be a constant expression in MSVC.
2011-07-13 21:57:50 -07:00
Vinson Lee f292d07b47 g3dvl: Remove designated initializers.
MSVC does not support designated initializers.
2011-07-13 17:00:26 -07:00
Vinson Lee 49967950a5 g3dvl: s/inline/INLINE/
The inline keyword is not available in MSVC C.
2011-07-13 15:59:08 -07:00
Christian König d4cbd1272b [g3dvl] don't upload all quant buffer layers at once
There seems to be a bug in r600g when uploading more than one layer of a
3D resource at once with a hardware blit.

So just do them one at a time to workaround this.
2011-07-13 23:33:20 +02:00
Christian König c5110a1bfa [g3dvl] implement workaround for missing blender clamp control
It's about 20% slower, but should at least work with every hardware.
2011-07-13 16:07:30 +02:00
Christian König 7c48575402 [g3dvl] keep a pointer in idct buffer to idct object
So we always know to which idct object a buffer belongs
2011-07-13 15:01:40 +02:00
Christian König efc7fda462 [g3dvl] add some more PIPE_VIDEO_CAPs 2011-07-12 00:12:12 +02:00
Christian König df5e0b9435 [g3dvl] fix a whole bunch of memory leaks 2011-07-11 16:29:02 +02:00
Christian König ea78480029 [g3dvl] and finally remove pipe_video_context 2011-07-08 19:22:43 +02:00
Christian König 4e837f557b [g3dvl] move video buffer creation out of video context 2011-07-08 16:56:11 +02:00
Christian König bd5fd67a3e [g3dvl] move compositor creation and handling directly into the state trackers 2011-07-08 14:44:19 +02:00
Christian König 10fd45114d [g3dvl] remove sampler view handling from video context 2011-07-08 12:47:52 +02:00
Christian König 06ddbc3b8e [g3dvl] remove create_surface from video context 2011-07-08 12:15:48 +02:00
Christian König 2ec350ff1d [g3dvl] make pipe_context mandatory for creation pipe_video_context 2011-07-08 12:03:13 +02:00
Christian König 7eca76952b [g3dvl] rename is_format_supported to is_video_format_supported and move it into screen object 2011-07-08 11:20:39 +02:00
Christian König f265a19426 [g3dvl] rename get_param to get_video_param and move into screen object 2011-07-07 22:51:45 +02:00
Christian König 00b4e48560 [g3dvl] rework video buffer format handling 2011-06-07 22:01:30 +02:00
Christian König f1bf7d3dbf [g3dvl] move dummy quantification into xvmc state tracker 2011-06-07 21:13:59 +02:00
Christian König b4fa7db656 [g3dvl] split quant matrix out of picture info 2011-06-05 18:59:57 +02:00
Christian König c4a168819d [g3dvl] rename map/unmap to begin/end frame
mapping and unmapping of buffers is just an implementation detail.
begining and ending an frame is much more descriptive
2011-06-05 17:53:48 +02:00