vc_image: Default YUVUV to non-tall mode, with flag if required.

The HEVC block and various others don't require tall mode, it's only
the H264 codec block that has to keep the column stride below
64kB.

Switch the default configuration to NOT require tall mode.
All the users of SAND with the H264 block are currently internal
to the VPU (video decode will vc_image_convert, or pass an opaque
VC_IMAGE_T. Camera to video_encode either goes via planar, or is
passing a VC_IMAGE_T).
Add a flag to these when creating the images to request tall mode.
This commit is contained in:
Dave Stevenson
2019-08-27 11:27:27 +01:00
committed by popcornmix
parent c1b07d07b0
commit 1117308aaa
3 changed files with 13 additions and 9 deletions

View File

@@ -108,7 +108,8 @@ extern "C" {
VC_IMAGE_PROP_YUV_COLOURSPACE,
/* Linked-multichannel properties*/
VC_IMAGE_PROP_LINKED_MULTICHANN,
VC_IMAGE_PROP_VPITCH
VC_IMAGE_PROP_VPITCH,
VC_IMAGE_PROP_TALL_YUVUV,
} VC_IMAGE_PROPERTY_T;
/* A property key and value */
@@ -125,7 +126,7 @@ extern "C" {
bits should be zero and enforce this in vc_image functions to catch people
who aren't initialising the VC_IMAGE_T structure nicely; update when other
bits are added */
#define VC_IMAGE_INFO_VALIDBITS 0x9F0F
#define VC_IMAGE_INFO_VALIDBITS 0xBF0F
/* Define the bits of info used to denote the colourspace */
#define VC_IMAGE_INFO_COLOURSPACE 0x0F

View File

@@ -161,7 +161,7 @@ int calculate_pitch(VC_IMAGE_TYPE_T type, int width, int height, uint8_t num_cha
/* Check if an image will use an alternate memory layout, in order to cope with
* codec limitation. Applies to YUV_UV images taller than 1344 lines. */
int vc_image_is_tall_yuv_uv(VC_IMAGE_TYPE_T type, int height);
int vc_image_is_tall_yuv_uv(VC_IMAGE_T *image);
/******************************************************************************
Data member access.

View File

@@ -59,15 +59,18 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VC_IMAGE_YUVINFO_CSC_SMPTE_170M = VC_IMAGE_YUVINFO_CSC_ITUR_BT601,
/* co-sited flags, assumed interstitial if not co-sited [2 bits] */
VC_IMAGE_YUVINFO_H_COSITED = 256,
VC_IMAGE_YUVINFO_V_COSITED = 512,
VC_IMAGE_YUVINFO_H_COSITED = 1<<8,
VC_IMAGE_YUVINFO_V_COSITED = 1<<9,
VC_IMAGE_YUVINFO_TOP_BOTTOM = 1024,
VC_IMAGE_YUVINFO_DECIMATED = 2048,
VC_IMAGE_YUVINFO_PACKED = 4096,
VC_IMAGE_YUVINFO_TOP_BOTTOM = 1<<10,
VC_IMAGE_YUVINFO_DECIMATED = 1<<11,
VC_IMAGE_YUVINFO_PACKED = 1<<12,
/* For YUVUV enforce use the tall mode to keep the column stride below 64k */
VC_IMAGE_YUVINFO_TALL_YUVUV = 1<<13,
/* Certain YUV image formats can either be V/U interleaved or U/V interleaved */
VC_IMAGE_YUVINFO_IS_VU = 0x8000,
VC_IMAGE_YUVINFO_IS_VU = 1<<15,
/* Force Metaware to use 16 bits */
VC_IMAGE_YUVINFO_FORCE_ENUM_16BIT = 0xffff,