Add description of the return status for vaSyncSurface()#774
Add description of the return status for vaSyncSurface()#774pengxin99 wants to merge 1 commit intointel:masterfrom
Conversation
79c3709 to
8ba1827
Compare
8ba1827 to
36407ae
Compare
8b94cd0 to
35d5b95
Compare
|
Hi, @XinfengZhang @Jexu, have add more detail description, could you pls help to review this PR again? |
va/va.h
Outdated
| * and verify its validity and integrity. | ||
| * - \ref VA_STATUS_ERROR_OPERATION_FAILED: When the attempt to retrieve the status report fails or related work | ||
| * on the current surface fails, this error is generated. In such cases, the client can proceed with subsequent | ||
| * frames by ignore the error, but it may involve incorrect result like corruption. |
There was a problem hiding this comment.
it means "operation failed" could be ignored by application
There was a problem hiding this comment.
VA_STATUS_ERROR_OPERATION_FAILED is caused by status report fail which cannot be used to determine whether the result is correct. So declare here that APP can ignore this error but may meet incorrect result.
And will add more detail like "To init new context to avoid protentional incorrect result."
va/va.h
Outdated
| * on the current surface fails, this error is generated. In such cases, the client can proceed with subsequent | ||
| * frames by ignore the error, but it may involve incorrect result like corruption. | ||
| * - \ref VA_STATUS_ERROR_HW_BUSY: This error indicates that synchronization is still in progress or GPU hang happens. | ||
| * The client could call the function again within a period of time to wait hw execution completion. |
va/va.h
Outdated
| * - \ref VA_STATUS_ERROR_HW_BUSY: This error indicates that synchronization is still in progress or GPU hang happens. | ||
| * The client could call the function again within a period of time to wait hw execution completion. | ||
| * If hw execution could not complete successfully, gpu hang and reset may occur, in this case, | ||
| * application could try to recover media context by initialing new one. |
There was a problem hiding this comment.
must recreate context? could application just ignore it?
There was a problem hiding this comment.
I think the recreate context is must, VA_STATUS_ERROR_HW_BUSY indicate that HW reset happened, this need to recover media context. Media reset will not return this error.
va/va.h
Outdated
| * - \ref VA_STATUS_ERROR_DECODING_ERROR: This error is encountered when macroblock (MB) errors with | ||
| * non-conformance input clips are detected during the decoding process. The application can proceed with | ||
| * subsequent frames, but it is advised to be aware of potential corruption in the output. | ||
| * Call vaQuerySurfaceError could get more details of mb error information. |
There was a problem hiding this comment.
difference comparing with VA_STATUS_ERROR_OPERATION_FAILED
|
I agree with the direction, provide hint to application , then application could handle correlated errors , ignore , or reset the context etc. . but operation failed is unclear. |
|
@XinfengZhang Thanks for the comments. and I will refine this PR for below two point:
The VA_STATUS_ERROR_HW_BUSY is only for HW reset, so cannot ignore this error, vaSyncSurface will return success if media reset happended.
can see the below comment: #774 (comment) |
va/va.h
Outdated
| * - \ref VA_STATUS_ERROR_OPERATION_FAILED: When the attempt to retrieve the status report fails or related work | ||
| * on the current surface fails, this error is generated. In such cases, the client can proceed with subsequent | ||
| * frames by ignore the error, but it may involve incorrect result like corruption, MD5 mismatch or HW hang. | ||
| * Initialize new context can avoid the potential issues. |
There was a problem hiding this comment.
| * Initialize new context can avoid the potential issues. | |
| * Initializing new context can avoid the potential issues. |
va/va.h
Outdated
| * - \ref VA_STATUS_ERROR_HW_BUSY: This error indicates that synchronization is still in progress or GPU hang happens. | ||
| * The client could call the function again with the same render_target within a period of time to wait hw execution completion. | ||
| * If hw execution could not complete successfully, gpu hang and reset may occur, in this case, | ||
| * application could try to recover media context by initialing new one. |
There was a problem hiding this comment.
| * application could try to recover media context by initialing new one. | |
| * application could try to recover media context by initializing new one. |
va/va.h
Outdated
| * - \ref VA_STATUS_ERROR_DECODING_ERROR: This error is encountered when macroblock (MB) errors with | ||
| * non-conformance input clips are detected during the decoding process. The application can proceed with | ||
| * subsequent frames, but it is advised to be aware of potential corruption in the output. | ||
| * Call vaQuerySurfaceError could get more details of mb error information. |
There was a problem hiding this comment.
| * Call vaQuerySurfaceError could get more details of mb error information. | |
| * Call vaQuerySurfaceError to get more details on mb error. |
va/va.h
Outdated
| * different picture. | ||
| * | ||
| * Possible errors: | ||
| * - \ref VA_STATUS_ERROR_INVALID_CONTEXT: This error occurs when the function is provided with an invalid context. |
There was a problem hiding this comment.
This error occurs when the function is provided with an invalid context.
Function prototype does not have context at all. So, this error is inadequate ( VA_STATUS_ERROR_INVALID_DISPLAY seems more reasonable) or at least incorrectly described. VAStatus vaSyncSurface(VADisplay dpy, VASurfaceID render_target).
There was a problem hiding this comment.
thanks for this advice, the media-driver will return VA_STATUS_ERROR_INVALID_CONTEXT instead of VA_STATUS_ERROR_INVALID_DISPLAY , so I only correct the comments here to make sure the API compatible with the old version.
|
Also, please, squash commits. For this change there should be just 1 commit in the PR. |
this will indicate APP behavior when meet VA_STATUS_ERROR_DECODING_ERROR from vaSyncSurface Signed-off-by: Pengxin Yuan <pengxin.yuan@intel.com>
3a201cd to
b0a8b63
Compare
@dvrogozh Thanks for your review, and have refined this PR, could pls have a look again? |
|
Hi, @dvrogozh @XinfengZhang , Can you take another look at this PR if you have time? |
|
Hi, @XinfengZhang , Could you pls take another look at this PR when you have time? |
this will indicate APP behavior when meet VA_STATUS_ERROR_DECODING_ERROR from vaSyncSurface