-
Notifications
You must be signed in to change notification settings - Fork 618
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
Frames decoder gpu without index #4302
Frames decoder gpu without index #4302
Conversation
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
!build |
CI MESSAGE: [6054940]: BUILD STARTED |
if (frames_decoder->HasIndex()) { | ||
return frames_decoder->ProcessPictureDecodeWithIndex(user_data, picture_params); | ||
} | ||
|
||
return frames_decoder->ProcessPictureDecodeWithoutIndex(user_data, picture_params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case I think that if/else is more verbose about one of the options, as it is not early exit after all.
if (frames_decoder->HasIndex()) { | |
return frames_decoder->ProcessPictureDecodeWithIndex(user_data, picture_params); | |
} | |
return frames_decoder->ProcessPictureDecodeWithoutIndex(user_data, picture_params); | |
if (frames_decoder->HasIndex()) { | |
return frames_decoder->ProcessPictureDecodeWithIndex(user_data, picture_params); | |
} else { | |
return frames_decoder->ProcessPictureDecodeWithoutIndex(user_data, picture_params); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
CI MESSAGE: [6054940]: BUILD PASSED |
if (HasIndex()) { | ||
return ReadNextFrameWithIndex(data, copy_to_output); | ||
} | ||
|
||
return ReadNextFrameWithoutIndex(data, copy_to_output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick - for symmetry
if (HasIndex()) { | |
return ReadNextFrameWithIndex(data, copy_to_output); | |
} | |
return ReadNextFrameWithoutIndex(data, copy_to_output); | |
if (HasIndex()) { | |
return ReadNextFrameWithIndex(data, copy_to_output); | |
} else { | |
return ReadNextFrameWithoutIndex(data, copy_to_output); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
|
||
bool FramesDecoderGpu::EmptyBuffer() const { | ||
for (auto &frame_ : frame_buffer_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (auto &frame_ : frame_buffer_) { | |
for (auto &frame : frame_buffer_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
!build |
CI MESSAGE: [6116405]: BUILD STARTED |
* @note This constructor assumes that the `memory_file` and | ||
* `memory_file_size` arguments cover the entire video file, including the header. | ||
*/ | ||
FramesDecoder(const char *memory_file, int memory_file_size, bool build_index = true); | ||
|
||
/** | ||
* @brief Number of frames in the video. It returns 0, if this information is unavailable. | ||
* | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you touch these lines - they should just go away if we don't have anything after "brief".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IDE trimmed the trailing whitespaces. Nevertheless, removed.
CI MESSAGE: [6116405]: BUILD PASSED |
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@@ -108,11 +114,21 @@ class DLL_PUBLIC FramesDecoderGpu : public FramesDecoder { | |||
|
|||
BufferedFrame& FindEmptySlot(); | |||
|
|||
bool HasEmptySlot() const; | |||
|
|||
bool EmptyBuffer() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reads like "empty the buffer" == "make it empty".
bool EmptyBuffer() const; | |
bool BufferEmpty() const; |
or
bool EmptyBuffer() const; | |
bool IsBufferEmpty() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
return false; | ||
} | ||
|
||
bool FramesDecoderGpu::EmptyBuffer() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool FramesDecoderGpu::EmptyBuffer() const { | |
bool FramesDecoderGpu::BufferEmpty() const { |
or
bool FramesDecoderGpu::EmptyBuffer() const { | |
bool FramesDecoderGpu::IsBufferEmpty() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
!build |
CI MESSAGE: [6161684]: BUILD STARTED |
CI MESSAGE: [6161733]: BUILD STARTED |
CI MESSAGE: [6161684]: BUILD PASSED |
CI MESSAGE: [6161733]: BUILD FAILED |
CI MESSAGE: [6167376]: BUILD STARTED |
CI MESSAGE: [6167376]: BUILD PASSED |
building the internal index
Category:
New feature (non-breaking change which adds functionality)
Description:
building the internal index
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-3038