Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc

Issue 2622233002: Remove backwards compatibilty path for OpenH264 v1.4 (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index e6f9995675e1da89bf0ecf417760e7e7589cdaca..722b0606ad2f0067538b4d0aecaa9ac4cad8c3c3 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -449,32 +449,14 @@ SEncParamExt H264EncoderImpl::CreateEncoderParams() const {
<< OPENH264_MINOR;
switch (packetization_mode_) {
case H264PacketizationMode::SingleNalUnit:
-// Limit the size of the packets produced.
-#if (OPENH264_MAJOR == 1) && (OPENH264_MINOR <= 5)
- encoder_params.sSpatialLayers[0].sSliceCfg.uiSliceMode = SM_DYN_SLICE;
- // The slice size is max payload size - room for a NAL header.
- // The constant 50 is NAL_HEADER_ADD_0X30BYTES in openh264 source,
- // but is not exported.
- const kNalHeaderSizeAllocation = 50;
- encoder_params.sSpatialLayers[0]
- .sSliceCfg.sSliceArgument.uiSliceSizeConstraint =
- static_cast<unsigned int>(max_payload_size_ -
- kNalHeaderSizeAllocation);
- encoder_params.uiMaxNalSize =
- static_cast<unsigned int>(max_payload_size_);
-#else
+ // Limit the size of the packets produced.
encoder_params.sSpatialLayers[0].sSliceArgument.uiSliceNum = 1;
encoder_params.sSpatialLayers[0].sSliceArgument.uiSliceMode =
SM_SIZELIMITED_SLICE;
encoder_params.sSpatialLayers[0].sSliceArgument.uiSliceSizeConstraint =
static_cast<unsigned int>(max_payload_size_);
-#endif
break;
case H264PacketizationMode::NonInterleaved:
-#if (OPENH264_MAJOR == 1) && (OPENH264_MINOR <= 5)
- // Slice num according to number of threads.
- encoder_params.sSpatialLayers[0].sSliceCfg.uiSliceMode = SM_AUTO_SLICE;
-#else
// When uiSliceMode = SM_FIXEDSLCNUM_SLICE, uiSliceNum = 0 means auto
// design it with cpu core number.
// TODO(sprang): Set to 0 when we understand why the rate controller borks
@@ -482,7 +464,6 @@ SEncParamExt H264EncoderImpl::CreateEncoderParams() const {
encoder_params.sSpatialLayers[0].sSliceArgument.uiSliceNum = 1;
encoder_params.sSpatialLayers[0].sSliceArgument.uiSliceMode =
SM_FIXEDSLCNUM_SLICE;
-#endif
break;
}
return encoder_params;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698