| 1 |
#ifndef _I965_MEDIA_H264_H_ |
| 2 |
#define _I965_MEDIA_H264_H_ |
| 3 |
|
| 4 |
#include "i965_avc_bsd.h" |
| 5 |
#include "i965_avc_hw_scoreboard.h" |
| 6 |
#include "i965_avc_ildb.h" |
| 7 |
#include "i965_decoder.h" |
| 8 |
|
| 9 |
struct decode_state; |
| 10 |
struct i965_media_context; |
| 11 |
|
| 12 |
#define INST_UNIT_GEN4 16 |
| 13 |
#define INST_UNIT_GEN5 8 |
| 14 |
|
| 15 |
#define MB_CMD_IN_BYTES 64 |
| 16 |
#define MB_CMD_IN_DWS 16 |
| 17 |
#define MB_CMD_IN_OWS 4 |
| 18 |
|
| 19 |
enum { |
| 20 |
H264_AVC_COMBINED = 0, |
| 21 |
H264_AVC_NULL |
| 22 |
}; |
| 23 |
|
| 24 |
#define NUM_H264_AVC_KERNELS 2 |
| 25 |
|
| 26 |
struct i965_h264_context { |
| 27 |
struct { |
| 28 |
dri_bo *bo; |
| 29 |
unsigned int mbs; |
| 30 |
} avc_it_command_mb_info; |
| 31 |
|
| 32 |
struct { |
| 33 |
dri_bo *bo; |
| 34 |
long write_offset; |
| 35 |
} avc_it_data; |
| 36 |
|
| 37 |
struct { |
| 38 |
dri_bo *bo; |
| 39 |
} avc_ildb_data; |
| 40 |
|
| 41 |
struct { |
| 42 |
unsigned int width_in_mbs; |
| 43 |
unsigned int height_in_mbs; |
| 44 |
int mbaff_frame_flag; |
| 45 |
int i_flag; |
| 46 |
} picture; |
| 47 |
|
| 48 |
int enable_avc_ildb; |
| 49 |
int use_avc_hw_scoreboard; |
| 50 |
|
| 51 |
int use_hw_w128; |
| 52 |
unsigned int weight128_luma_l0; |
| 53 |
unsigned int weight128_luma_l1; |
| 54 |
unsigned int weight128_chroma_l0; |
| 55 |
unsigned int weight128_chroma_l1; |
| 56 |
char weight128_offset0_flag; |
| 57 |
short weight128_offset0; |
| 58 |
|
| 59 |
struct i965_avc_bsd_context i965_avc_bsd_context; |
| 60 |
struct i965_avc_hw_scoreboard_context avc_hw_scoreboard_context; |
| 61 |
struct i965_avc_ildb_context avc_ildb_context; |
| 62 |
|
| 63 |
GenFrameStoreContext fs_ctx; |
| 64 |
GenFrameStore fsid_list[MAX_GEN_REFERENCE_FRAMES]; |
| 65 |
|
| 66 |
struct i965_kernel avc_kernels[NUM_H264_AVC_KERNELS]; |
| 67 |
struct intel_batchbuffer *batch; |
| 68 |
}; |
| 69 |
|
| 70 |
void i965_media_h264_decode_init(VADriverContextP ctx, struct decode_state *decode_state, struct i965_media_context *media_context); |
| 71 |
void i965_media_h264_dec_context_init(VADriverContextP ctx, struct i965_media_context *media_context); |
| 72 |
|
| 73 |
#endif /* _I965_MEDIA_H264_H_ */ |