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

Side by Side Diff: webrtc/modules/rtp_rtcp/include/rtp_cvo.h

Issue 2280703002: Ignore Camera and Flip bits in CVO when parsing video rotation (Closed)
Patch Set: Update unittests Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_CVO_H_ 10 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_CVO_H_
(...skipping 16 matching lines...) Expand all
27 return 1; 27 return 1;
28 case kVideoRotation_180: 28 case kVideoRotation_180:
29 return 2; 29 return 2;
30 case kVideoRotation_270: 30 case kVideoRotation_270:
31 return 3; 31 return 3;
32 } 32 }
33 RTC_NOTREACHED(); 33 RTC_NOTREACHED();
34 return 0; 34 return 0;
35 } 35 }
36 36
37 inline VideoRotation ConvertCVOByteToVideoRotation(uint8_t rotation) { 37 inline VideoRotation ConvertCVOByteToVideoRotation(uint8_t cvo_byte) {
38 switch (rotation) { 38 // CVO byte: |0 0 0 0 C F R R|.
39 const uint8_t rotation_bits = cvo_byte & 0x3;
40 switch (rotation_bits) {
39 case 0: 41 case 0:
40 return kVideoRotation_0; 42 return kVideoRotation_0;
41 case 1: 43 case 1:
42 return kVideoRotation_90; 44 return kVideoRotation_90;
43 case 2: 45 case 2:
44 return kVideoRotation_180; 46 return kVideoRotation_180;
45 case 3: 47 case 3:
46 return kVideoRotation_270; 48 return kVideoRotation_270;
47 default: 49 default:
48 RTC_NOTREACHED(); 50 RTC_NOTREACHED();
49 return kVideoRotation_0; 51 return kVideoRotation_0;
50 } 52 }
51 } 53 }
52 54
53 } // namespace webrtc 55 } // namespace webrtc
54 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_CVO_H_ 56 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_CVO_H_
OLDNEW
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698