On 10/19/2018 01:51 AM, Hirokazu Honda wrote:
Hi, Sreerenj.
Thank you for leaving useful comments in my change.
> I'm not familiar with the chromium-vaapi code,so not sure from where the control
reaches in the code intended for allocation. So let me ask, Are you using I420 format for
both input surface and scratch surface for reconstructed surface? IIRC, the reconstructed
surface should be NV12. At least this is what we do in gstreamer-vaapi.
I read gstreamer-vaapi code today, but still not sure how
gstreamer-vaapi specifies reconstructed surface to NV12.
Could you point me the place?
The whole allocation story is bit complicated in gstreamer-vaapi :)
reconsuctured buffer allocation for h264 encoder:
https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi/tree/gst-libs/gst/...
Let me explain briefly my change.
In my change, Surface is allocated with I420 pixel format in [1]
Then, Chromium copies I420 userspace buffer to vaSurface in [2]. The
vaimage is obtained using in vaDerivedImage, and thus offsets and
pitches should be correct.
Should be fine..
[1]
https://chromium-review.googlesource.com/c/chromium/src/+/1272240/5/media...
[2]
https://chromium-review.googlesource.com/c/chromium/src/+/1272240/5/media...
> Also make sure you are correctly dealing the pitch/alignment for the derived images
when coping the input raw data (alignment are different for tiled-nv12 and
non-tiled-i420).
I cannot understand this. I think chromium don't refer someting
related tiled-nv12 buffer. Chromium only copies its i420 buffer to
surface buffer. The surface buffer is not tiled.
What am I wrong?
Aha okay, I was talking from a gstreamer implementation perspective. You
should be fine here.
Regarding the tiling: Vaapi encoder always always need tiled nv12 input
and the driver do the conversion of your non-tiled i420 to tiled nv12
internally and
You don't have to worry about it.
Just make sure there is no code which assume the NV12 and I420 surface
derived images have same alignment/size even though width and height are
the same.
I have seen people making this mistake when dealing these raw formats.
Thanks so much in advance.
On Wed, Oct 17, 2018 at 5:58 PM Hirokazu Honda <hiroh(a)chromium.org> wrote:
> Thanks. I am looking forward to perform the conversion in driver in
> the case of I420 on the device, where it says it supports I420.
> I am debugging my patch [1] today on Gen9 KBL device. Invalid
> VASurfaceID error in vaEndPicture is come from vme_pipeline [2].
> I am not familiar with the code around there. Would anyone kindly take
> a look at it?
>
> [1]
https://chromium-review.googlesource.com/c/chromium/src/+/1272240
> [2]
https://github.com/intel/intel-vaapi-driver/blob/021bcb79d1bd873bbd9fbca5...
>
> Thanks
> On Wed, Oct 17, 2018 at 3:02 AM Sreerenj
> <sreerenj.balachandran(a)intel.com> wrote:
>> comments in chromium bugzilla:
>>
https://chromium-review.googlesource.com/c/chromium/src/+/1272240#message...
>>
>>
>> On 10/16/2018 02:03 AM, Víctor Jáquez wrote:
>>> On Tue, 16 Oct 2018 at 17:09, Hirokazu Honda wrote:
>>>> Hi, I wrote an experiment CL[1] and got "invalid VASurfaceID"
error in
>>>> vaEndPicture() when the image format of input buffer was I420.
>>>> Originally, the image format was NV12. With NV12 format input, no
>>>> problem happened.
>>>> Next, I would try to test with a small code to do the same thing,
>>>> which is independent from Chromium code base.
>>>> By the way, can gstreamer-vaapi be working with non-NV12 format input
buffer?
>>>> Before I go to next step, I would like to make sure that.
>>> If the driver is capable to upload images with non-NV12 format then
>>> gstreamer-vaapi will do it.
>>>
>>> There's a nice utility to check the capabilities of a vaapi backend:
>>>
>>>
http://ixia.jkqxz.net/~mrt/vadumpcaps.c
>>>
>>>> [1]
https://chromium-review.googlesource.com/c/chromium/src/+/1272240
>>>>
>>>> Thanks
>>>> On Wed, Oct 10, 2018 at 12:39 AM Víctor Jáquez <vjaquez(a)igalia.com>
wrote:
>>>>> In gstreamer-vaapi we query the surface, in a given config, for all
the possible
>>>>> settable pixel formats:
>>>>>
>>>>>
https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi/tree/gst-libs/gst/...
>>>>>
>>>>> which boils down to
>>>>>
>>>>>
https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi/tree/gst-libs/gst/...
>>>>>
>>>>> vmjl
>>>>>
>>>>> On Tue, 09 Oct 2018 at 23:51, Hirokazu Honda wrote:
>>>>>> Hi, I would like to know the way of negotiating yuv format of raw
data
>>>>>> (input buffers) for video encoding.
>>>>>> In my code base (Chromium), it always assumes intel chips is able
to
>>>>>> encode NV12 format buffer.
>>>>>> I guess intel chips can encode other yuv format buffers.
>>>>>> Although I searched an example code that negotiates yuv format
in
>>>>>> video encoding using VA-API, I didn't find yet.
>>>>>>
>>>>>> Are there any example code to negotiate yuv format in video
encoding?
>>>>>>
>>>>>> Thanks,
>>>>>> -Hiro
>>>>>> _______________________________________________
>>>>>> intel-vaapi-media mailing list
>>>>>> intel-vaapi-media(a)lists.01.org
>>>>>>
https://lists.01.org/mailman/listinfo/intel-vaapi-media
>>>>>>
>>> _______________________________________________
>>> intel-vaapi-media mailing list
>>> intel-vaapi-media(a)lists.01.org
>>>
https://lists.01.org/mailman/listinfo/intel-vaapi-media
>> --
>> Thanks
>> Sree
>>
>> _______________________________________________
>> intel-vaapi-media mailing list
>> intel-vaapi-media(a)lists.01.org
>>
https://lists.01.org/mailman/listinfo/intel-vaapi-media
--
Thanks
Sree