Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhance][AYUV][render target]Request for a render target for AYUV #335

Open
fulinjie opened this issue Sep 10, 2019 · 3 comments
Open

[enhance][AYUV][render target]Request for a render target for AYUV #335

fulinjie opened this issue Sep 10, 2019 · 3 comments

Comments

@fulinjie
Copy link
Contributor

Request for a new render target for AYUV:
VA_RT_FORMAT_AYUV for 4:4:4 8 bit hardware decode support.

Requested by community:
https://patchwork.ffmpeg.org/patch/13728/

fulinjie added a commit to fulinjie/ffmpeg that referenced this issue Sep 10, 2019
There is no VA_RT_FORMAT_AYUV in defined in libva, and currently in
media-driver, VA_FOURCC_AYUV is used to represent VA_RT_FORMAT_AYUV.

Another patch could be sent to refine the code after this issue is
addressed:
intel/libva#335

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
fulinjie added a commit to fulinjie/ffmpeg that referenced this issue Sep 12, 2019
There is no VA_RT_FORMAT_AYUV in defined in libva, and currently in
media-driver, VA_FOURCC_AYUV is used to represent VA_RT_FORMAT_AYUV.

Another patch could be sent to refine the code after this issue is
addressed:
intel/libva#335

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
@fulinjie
Copy link
Contributor Author

Also, request for a new render target for Y410, since Y410 has alpha channel, but the render_target format YUV444_10 doesn't have one.
https://patchwork.ffmpeg.org/patch/15008/

@fulinjie
Copy link
Contributor Author

Collected some information:

  1. in CreateDecAttributes and MediaLibvaCaps::CheckEncRTFormat,
    VA_RT_FORMAT_YUV444 and VA_RT_FORMAT_YUV444_10 are used for MAIN444 and MAIN444_10:

https://github.com/intel/media-driver/blob/cf80fa0e3c81361696ada1285ea17a417114be47/media_driver/linux/gen11/ddi/media_libva_caps_g11.cpp#L1189

https://github.com/intel/media-driver/blob/cf80fa0e3c81361696ada1285ea17a417114be47/media_driver/linux/common/ddi/media_libva_caps.cpp#L350

2.DDI_MEDIA_FORMAT mediaFmt = DdiMedia_OsFormatToMediaFormat(expected_fourcc,format);

mediaFmt is decided by expected_fourcc (firstly decided by the RT_FORMAT, then by the attrib value)

Which will be queried:
case VASurfaceAttribPixelFormat:
DDI_ASSERT(attrib_list[i].value.type == VAGenericValueTypeInteger);
expected_fourcc = attrib_list[i].value.value.i;

https://github.com/intel/media-driver/blob/cf80fa0e3c81361696ada1285ea17a417114be47/media_driver/linux/common/ddi/media_libva.cpp#L2222

  1. VA_RT_Format describes the sampling format, different fourcc may have the some rt_format:
    I420, NV12,YV12 has the same RT_FORMAT.

As to AYUV and Y410, YUV444 and YUV444_10 are able to present the sampling format well.

fulinjie added a commit to fulinjie/ffmpeg that referenced this issue Nov 28, 2019
There is no VA_RT_FORMAT_AYUV in defined in libva, and currently in
media-driver, VA_FOURCC_AYUV is used to represent VA_RT_FORMAT_AYUV.

Another patch could be sent to refine the code after this issue is
addressed:
intel/libva#335

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
fulinjie added a commit to fulinjie/ffmpeg that referenced this issue Nov 29, 2019
There is no VA_RT_FORMAT_AYUV in defined in libva, and currently in
media-driver, VA_FOURCC_AYUV is used to represent VA_RT_FORMAT_AYUV.

Another patch could be sent to refine the code after this issue is
addressed:
intel/libva#335

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
@fulinjie
Copy link
Contributor Author

fulinjie commented Dec 2, 2019

Hi @XinfengZhang , any comments?

fulinjie added a commit to fulinjie/ffmpeg that referenced this issue Jan 4, 2020
There is no VA_RT_FORMAT_AYUV in defined in libva, and currently in
media-driver, VA_FOURCC_AYUV is used to represent VA_RT_FORMAT_AYUV.

Another patch could be sent to refine the code after this issue is
addressed:
intel/libva#335

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant