Commit Graph

80 Commits

Author SHA1 Message Date
Emil Velikov 1d260360d8 vl/idct: cleanup all idct buffers
Code should loop through and cleanup the three (VL_NUM_COMPONENTS) idct
buffers, rather than doing the first one three times.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-08-19 18:32:08 +02:00
Andy Furniss 3448b66dac vdpau/vl 422 chroma width/height mix up
I was looking into some minor 422 issues/discrepencies I noticed long
ago using vdpau on my rv790.

I noticed that there is code that is halving height rather than width -
422 is full height AFAIK.

Making the changes below doesn't actually make any noticable difference
to what I was looking into.

Maybe there are more but here's three I've found so far

Reviewed-by: Christian König <christian.koenig@amd.com>
2013-08-19 18:31:26 +02:00
Christian König f2f7064e56 vl: rename pipe_video_decoder to pipe_video_codec
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-08-19 10:21:15 +02:00
Christian König 8e423ab984 vl: rename enum pipe_video_codec to pipe_video_format
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-08-19 10:21:15 +02:00
Christian König 53e20b8b41 vl: use a template for create_video_decoder
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-08-19 10:21:14 +02:00
Christian König 85b0880a17 vl/idct: fix for commit 7d2f2a0c89
We still need the option for handling 3D textures as well.

Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=64143

Signed-off-by: Christian König <christian.koenig@amd.com>
2013-05-03 11:00:21 +02: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
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
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 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 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
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
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
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
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
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
Brian Paul 005aea891e g3dvl: s/inline/INLINE/ to fix MSVC build 2011-08-26 08:24:01 -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 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 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 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
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 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 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 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
Christian König a6c76c8a90 [g3dvl] use a vertex element instead of the instance id 2011-06-04 23:54:46 +02:00
Christian König ded2a9a628 [g3dvl] respect maximum instruction for idct render targets 2011-06-01 20:37:57 +02:00
Christian König a019b60dd3 [g3dvl] dynamical adjust blocks per line 2011-06-01 19:41:43 +02:00
Christian König 912dc8ff09 [g3dvl] move quantification into shaders 2011-05-29 20:07:57 +02:00
Christian König ae56a1dd67 [g3dvl] implement mismatch control inside idct shaders 2011-05-29 20:07:57 +02:00
Christian König 311eb749a1 [g3dvl] rework resource format handling 2011-05-22 18:36:47 +02:00
Christian König 0121aae967 [g3dvl] no need for seperate intermediate buffers any more
This should reduce the video memory footprint drastically.
2011-05-15 14:07:39 +02:00
Christian König 56457ffe11 [g3dvl] move alignment of buffers to mb size into context 2011-05-15 13:08:38 +02:00
Christian König 6ad846ee78 [g3dvl] move zscan into shaders 2011-05-05 20:09:34 +02:00
Christian König e3789105fe [g3dvl] divide mpg12 width height by 16 2011-05-04 22:05:03 +02:00
Christian König c888fe027c [g3dvl] Implement MPEG2 VLD
Based uppon xine's slice_xvmc.c.
This gets VDPAU up and running.
2011-05-04 18:58:55 +02:00