Skip to content
Snippets Groups Projects
Commit c4b580a2 authored by Philippe Gorley's avatar Philippe Gorley Committed by Sébastien Blin
Browse files

video: don't blacken frame if not needed


The function yuv422_clear_to_black is called up to 3 times per frame.
Remove the superfluous calls. This function only does useful in a
conference, when there can be blank space in a frame.

Change-Id: I64588adba59daaf3677bad419a519432eec41dff
Reviewed-by: default avatarSébastien Blin <sebastien.blin@savoirfairelinux.com>
parent 8809a496
Branches
No related tags found
No related merge requests found
......@@ -273,11 +273,6 @@ int
MediaEncoder::encode(VideoFrame& input, bool is_keyframe,
int64_t frame_number)
{
/* Prepare a frame suitable to our encoder frame format,
* keeping also the input aspect ratio.
*/
yuv422_clear_to_black(scaledFrame_); // to fill blank space left by the "keep aspect"
scaler_.scale_with_aspect(input, scaledFrame_);
auto frame = scaledFrame_.pointer();
......
......@@ -189,8 +189,6 @@ VideoMixer::setDimensions(int width, int height)
// cleanup the previous frame to have a nice copy in rendering method
std::shared_ptr<VideoFrame> previous_p(obtainLastFrame());
if (previous_p)
yuv422_clear_to_black(*previous_p);
start_sink();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment