intel / libyami

Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.
Apache License 2.0
147 stars 106 forks source link

Doesn't work VaapiPostProcessScaler #817

Open AlexanderKomarov opened 6 years ago

AlexanderKomarov commented 6 years ago

VaapiPostProcessScaler doesn't work. It returns SharedPtr < VideoFrame > with zeros in crop.width and crop.height. I tested it on the vpp test and my application. I use DRM as display. But all tests are passed.

I use Ubuntu 16.04. The latest libva, libyami and intel-vaapi-driver.

xuguangxin commented 6 years ago

could you share you command line and try our yamivpp application https://github.com/01org/libyami-utils/blob/master/tests/vpp.cpp like "yamivpp

AlexanderKomarov commented 6 years ago

I just run vpp/unittest. Also I added this line std::cout << std::to_string(dest->crop.width) << " " << std::to_string(dest->crop.height) << std::endl; to VppDeinterlace function in vaapipostprocess_scaler_unittest.cpp after this line EXPECT_EQ(YAMI_SUCCESS, scaler.process(src, dest)); And I get only zeros. Is it normal?

I ran our yamivpp application. And it works.

xuguangxin commented 6 years ago

Yes, it's defined feature. If crop is zero, It will scale to the entire surface. We have src crop and dest crop. src crop means you only need a sub rect on the source, dest crop means you only need scale src to the sub rect of dest.

AlexanderKomarov commented 6 years ago

ok, thank you for the answer.

Also quick question I tried to test YAMI_FOURCC_Y800 format for scaling but I get the error: "the requested function is not implemented". Do you plan to support it? And where can I get the list of supported formats for scaling?

xuguangxin commented 6 years ago

It's the error returned by libva. we depend on libva to do vpp.

Hi @xhaihao, Can we query csc format in libva?

HI @AlexanderKomarov Could you share us the usecase? Why you need Y800 scaling?

thanks

xhaihao commented 6 years ago

vaQuerySurfaceAttributes can return the supported surface attribute list for a given config, including pixel formats

AlexanderKomarov commented 6 years ago

@xuguangxin @xhaihao thanks for the answers.

We try to use Intel GPU for decoding/encoding JPEG from camera, scaling and transforming images. We use gray image in our system. Our system does face detection and face recognition.

AlexanderKomarov commented 6 years ago

@xuguangxin @xhaihao maybe is there some sense to add the issue of adding support Y800 for vpp in libva project?

xuguangxin commented 6 years ago

@xhaihao , what's the suggestion?:)