Closed
Conversation
Signed-off-by: kp5.choi@samsung.com <kp5.choi@samsung.com>
dkozinski
reviewed
May 8, 2025
Collaborator
dkozinski
left a comment
There was a problem hiding this comment.
What do you thing about using oapve_config() function to set encoder output format, as shown below
+/* bytestream format */
+#define OAPV_BF_RAW_BYTESTREAM_AU (0) // The output from the encoder is compliant with raw_bitstream_access_unit
+#define OAPV_BF_AU (1) // The output from the encoder consists of access units that are not preceded by an access unit size
+
/*****************************************************************************
* config types
*****************************************************************************/
@@ -152,6 +156,7 @@ extern "C" {
#define OAPV_CFG_SET_QP_MIN (208)
#define OAPV_CFG_SET_QP_MAX (209)
#define OAPV_CFG_SET_USE_FRM_HASH (301)
+#define OAPV_CFG_SET_ENC_OUTPUT_FORMAT (302)
#define OAPV_CFG_GET_QP_MIN (600)
#define OAPV_CFG_GET_QP_MAX (601)
#define OAPV_CFG_GET_QP (602)
@@ -1430,6 +1436,13 @@ int oapve_config(oapve_t eid, int cfg, void *buf, int *size)
oapv_assert_rv(*size == sizeof(int), OAPV_ERR_INVALID_ARGUMENT);
ctx->use_frm_hash = (*((int *)buf)) ? 1 : 0;
break;
+ case OAPV_CFG_SET_ENC_OUTPUT_FORMAT:
+ oapv_assert_rv(*size == sizeof(int), OAPV_ERR_INVALID_ARGUMENT);
+ t0 = *((int *)buf);
+ oapv_assert_rv(t0 == OAPV_BF_RAW_BYTESTREAM_AU || t0 == OAPV_BF_AU, OAPV_ERR_INVALID_ARGUMENT);
+ ctx->encoder_output_format = t0;
+ break;
jamrial
reviewed
May 8, 2025
| int full_range_flag; | ||
| }; | ||
|
|
||
| #define OAPV_CDESC_THREADS_AUTO 0 |
Contributor
There was a problem hiding this comment.
This is unrelated to the PR, and strictly speaking an API break.
Collaborator
Author
I think this method would be more easy to understand. I will close this PR and raise again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supports encoding output which doesn't have 'au_size' of 'raw bitstream format'.
It can be controlled by the 'disable_raw_bitstream_format' variable in oapve_cdesc_t structure.