Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

[avce] Expand zero ROI to minimum supported size #2487

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmitryermilov
Copy link
Contributor

Fixes: #2013

Signed-off-by: Dmitry Ermilov [email protected]

@dmitryermilov
Copy link
Contributor Author

@lakulako , @saosipov , could you review?

Copy link
Contributor

@lakulako lakulako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be put this check to CheckAndFixOpenRectQueryLike?

@dmitryermilov
Copy link
Contributor Author

May be put this check to CheckAndFixOpenRectQueryLike?

@lakulako , I did it at first. But then I noticed that the same CheckAndFixOpenRectQueryLike is called from run-time part (

mfxStatus sts = CheckAndFixRoiQueryLike(video, &task_roi, extRoiRuntime->ROIMode);
).
So moved new condition outside.

@lakulako
Copy link
Contributor

lakulako commented Nov 16, 2020

Shouldn't Init behave the same?

@dmitryermilov
Copy link
Contributor Author

Shouldn't Init behave the same?

I assume while for Query zero values (like no values) makes sense, for processing part zero values are useless, rather invalid.

@dmitryermilov
Copy link
Contributor Author

BTW, let's align HEVC and AVC here. Actually I thought HEVC behaved as I described above but now I'm not sure:). @yskuridi , could you say how after your ROI change HEVC behaves:

  • does it accept zero ROI values at Init and modifies them internally to min supported ROI rects (like Query does)

  • or at Init zero rect values are considered as errors (or simply ignored )?

@yskuridi
Copy link
Contributor

yskuridi commented Nov 17, 2020

  • does it accept zero ROI values at Init and modifies them internally to min supported ROI rects (like Query does)

Yes.

@dmitryermilov
Copy link
Contributor Author

  • does it accept zero ROI values at Init and modifies them internally to min supported ROI rects (like Query does)

Yes.

@eistarov , can you please comment? Is it correct behavior?

@eistarov
Copy link
Contributor

  • does it accept zero ROI values at Init and modifies them internally to min supported ROI rects (like Query does)

Yes.

@eistarov , can you please comment? Is it correct behavior?

I think, correct behavior would be to consider zero-rects as valid at Query and ignore at Init/run-time. Exception for Query required only due to "special" max supported NumROI report mechanic:

The Query function mode 2 returns maximum supported value (set it to 256 and Query will update it to maximum supported value).

@dmitryermilov
Copy link
Contributor Author

  • does it accept zero ROI values at Init and modifies them internally to min supported ROI rects (like Query does)

Yes.

@eistarov , can you please comment? Is it correct behavior?

I think, correct behavior would be to consider zero-rects as valid at Query and ignore at Init/run-time. Exception for Query required only due to "special" max supported NumROI report mechanic:
The Query function mode 2 returns maximum supported value (set it to 256 and Query will update it to maximum supported value).

Thanks @eistarov !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow ROI rectangle top/left/bottom/right to be 0 for query
4 participants