diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2014-05-09 18:52:00 +0200 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2014-06-02 19:30:43 +0200 |
commit | e9c2a677a04e911529966cccf71eb3a9ae59e6c3 (patch) | |
tree | 2c76af05e86408ceb6c1c827c9795b3a5e2ae008 /src/i965_drv_video.h | |
parent | 6d76944605a75872714744262ce0370581de9225 (diff) | |
download | libva-intel-driver-e9c2a677a04e911529966cccf71eb3a9ae59e6c3.tar.gz libva-intel-driver-e9c2a677a04e911529966cccf71eb3a9ae59e6c3.tar.bz2 libva-intel-driver-e9c2a677a04e911529966cccf71eb3a9ae59e6c3.zip |
decoder: h264: optimize support for grayscale surfaces.
Optimize support for grayscale surfaces in two aspects: (i) space
by only allocating the luminance component ; (ii) speed by avoiding
initialization of the (now inexistent) chrominance planes.
Keep backward compatibility with older codec layers that only
supported YUV 4:2:0 and not grayscale formats properly.
v2: fix check for extra H.264 chroma formats [Haihao]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'src/i965_drv_video.h')
-rw-r--r-- | src/i965_drv_video.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h index a09e071..e8bbf87 100644 --- a/src/i965_drv_video.h +++ b/src/i965_drv_video.h @@ -101,8 +101,13 @@ struct object_config #define NUM_SLICES 10 +struct codec_state_base { + uint32_t chroma_formats; +}; + struct decode_state { + struct codec_state_base base; struct buffer_store *pic_param; struct buffer_store **slice_params; struct buffer_store *iq_matrix; @@ -122,6 +127,7 @@ struct decode_state struct encode_state { + struct codec_state_base base; struct buffer_store *seq_param; struct buffer_store *pic_param; struct buffer_store *pic_control; @@ -152,6 +158,7 @@ struct encode_state struct proc_state { + struct codec_state_base base; struct buffer_store *pipeline_param; VASurfaceID current_render_target; @@ -163,6 +170,7 @@ struct proc_state union codec_state { + struct codec_state_base base; struct decode_state decode; struct encode_state encode; struct proc_state proc; @@ -294,6 +302,7 @@ struct hw_codec_info int min_linear_wpitch; int min_linear_hpitch; + unsigned int h264_dec_chroma_formats; unsigned int jpeg_dec_chroma_formats; unsigned int has_mpeg2_decoding:1; |