nv50/ir: Fold IMM into MAD
[mesa.git] / src / gallium / drivers / nouveau / nouveau_vp3_video.h
index 5e40385ce45c21dfeba0cbef4075373ac09f2566..279a1ce18efa0d200211b62bc2b8cd9e719aa596 100644 (file)
@@ -20,7 +20,7 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include <libdrm/nouveau.h>
+#include <nouveau.h>
 
 #include "pipe/p_defines.h"
 #include "vl/vl_video_buffer.h"
@@ -39,6 +39,8 @@ struct nouveau_vp3_video_buffer {
 #define VP_OFFSET 0x200
 #define COMM_OFFSET 0x500
 
+#define NOUVEAU_VP3_BSP_RESERVED_SIZE 0x700
+
 #define NOUVEAU_VP3_DEBUG_FENCE 0
 
 #if NOUVEAU_VP3_DEBUG_FENCE
@@ -60,7 +62,7 @@ union pipe_desc {
 };
 
 struct nouveau_vp3_decoder {
-   struct pipe_video_decoder base;
+   struct pipe_video_codec base;
    struct nouveau_client *client;
    struct nouveau_object *channel[3], *bsp, *vp, *ppp;
    struct nouveau_pushbuf *pushbuf[3];
@@ -107,6 +109,7 @@ struct nouveau_vp3_decoder {
       unsigned field_pic_flag : 1;
       unsigned decoded_top : 1;
       unsigned decoded_bottom : 1;
+      unsigned decoded_first : 1;
    } refs[17];
    unsigned fence_seq, fw_sizes, last_frame_num, tmp_stride, ref_stride;
 
@@ -185,7 +188,7 @@ nouveau_vp3_inter_sizes(struct nouveau_vp3_decoder *dec, uint32_t slice_count,
                         uint32_t *ring_size)
 {
    *slice_size = (SLICE_SIZE * slice_count)>>8;
-   if (u_reduce_video_profile(dec->base.profile) == PIPE_VIDEO_CODEC_MPEG12)
+   if (u_reduce_video_profile(dec->base.profile) == PIPE_VIDEO_FORMAT_MPEG12)
       *bucket_size = 0;
    else
       *bucket_size = mb(dec->base.width) * 3;
@@ -198,7 +201,7 @@ nouveau_vp3_video_buffer_create(struct pipe_context *pipe,
                                 int flags);
 
 void
-nouveau_vp3_decoder_init_common(struct pipe_video_decoder *decoder);
+nouveau_vp3_decoder_init_common(struct pipe_video_codec *decoder);
 
 int
 nouveau_vp3_load_firmware(struct nouveau_vp3_decoder *dec,
@@ -216,3 +219,15 @@ nouveau_vp3_vp_caps(struct nouveau_vp3_decoder *dec, union pipe_desc desc,
                     struct nouveau_vp3_video_buffer *target, unsigned comm_seq,
                     unsigned *caps, unsigned *is_ref,
                     struct nouveau_vp3_video_buffer *refs[16]);
+
+int
+nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
+                                   enum pipe_video_profile profile,
+                                   enum pipe_video_entrypoint entrypoint,
+                                   enum pipe_video_cap param);
+
+boolean
+nouveau_vp3_screen_video_supported(struct pipe_screen *screen,
+                                   enum pipe_format format,
+                                   enum pipe_video_profile profile,
+                                   enum pipe_video_entrypoint entrypoint);