OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

Dose VME advanced support intra prediction

wu__frank
Beginner
255 Views

I want to use VME advanced version to do video analysis. some of the information may be useful, like mv, intra mode etc. But in my program, intra mode seems not correct. MVs is OK. Every MBs has a stranger value(negative value or large value) which is not a correct intra prediction mode.

struct search_predictor_modes
  {
  char luma_16x16_block;
  char luma_8x8_block[4];
  char luma_4x4_block[16];
  char chroma_8x8_block;
  };

 

cl_mem memIntra = clCreateBuffer(...CL_MEM_ALLOC_HOST_PTR...,sizoef(search_predictor_modes)*numMBs);

search_predictor_modes cIntraModes = new search_predictor_modes [numMBs];

and set the 11th argumant to obtain intra modes

When kernel finished running, use clEnqueueReadBuffer or MapBuffer to get the results into cIntraModes .

I think these procedure are correct, because MVs results is OK. but the intra result is actually not seems like INTRA MODE (0x0-0x8).

My PC platform is i5-6500 with HD 530 graphics.

0 Kudos
1 Solution
Jeffrey_M_Intel1
Employee
255 Views

Intra prediction is supported, but it is off by default -- including in the sample.  The sample includes two flags you can set to enable intra prediction: 

#define    CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL                        0x1
#define    CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL                          0x2

 

 

View solution in original post

3 Replies
Jeffrey_M_Intel1
Employee
256 Views

Intra prediction is supported, but it is off by default -- including in the sample.  The sample includes two flags you can set to enable intra prediction: 

#define    CL_ME_CHROMA_INTRA_PREDICT_ENABLED_INTEL                        0x1
#define    CL_ME_LUMA_INTRA_PREDICT_ENABLED_INTEL                          0x2

 

 

wu__frank
Beginner
255 Views

Great! I forgot to set these two arguments. still use default value 0 according to the page link https://software.intel.com/en-us/articles/intro-to-advanced-motion-estimation-extension-for-opencl, which write as flags defines any optional modes or behaviors when computing motion estimation, skip-check and/or intra-prediction algorithms. Currently the only supported value is 0, however, the following token is reserved for future support.

Okay, thanks a lot. It can work well. By the way, the first video frame should be treat as intra picture, no reference image. How can I set the ref_image argument for this case?

wu__frank
Beginner
255 Views

Hi Jeffrey, I met a strange problem. Details are as follows

I use VME to obtain MVs information. mv output memory is allocate as CL_MEM_ALLOC_HOST_PTR, when kernel finished,

Scheme1: I use MapBuffer API, and then excute memcpy function to Host application memory, and then do some CPU operators, at last excute UmMap. We assume this scheme time consume is 100ms. MVs is correct.

Scheme2: However when I skip step of excute memcpy function to Host application memory. Just use mapped pointer to do some CPU operators. and then UnMap. this scheme time is more fast. Probably 70ms. MVs is correct and same as Scheme1.

But today I re-run the kernel and found the Scheme2 no time gain. obviously greater than 70ms. It is so strange and I am very depressed. Whether the VME kernel execution time is not stable?or GPU has some problems. 

 

Reply