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

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

Issue 2300323002: Revert of Ignore Camera and Flip bits in CVO when parsing video rotation (Closed)
Patch Set: 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 cvo_byte) { 37 inline VideoRotation ConvertCVOByteToVideoRotation(uint8_t rotation) {
38 // CVO byte: |0 0 0 0 C F R R|. 38 switch (rotation) {
39 const uint8_t rotation_bits = cvo_byte & 0x3;
40 switch (rotation_bits) {
41 case 0: 39 case 0:
42 return kVideoRotation_0; 40 return kVideoRotation_0;
43 case 1: 41 case 1:
44 return kVideoRotation_90; 42 return kVideoRotation_90;
45 case 2: 43 case 2:
46 return kVideoRotation_180; 44 return kVideoRotation_180;
47 case 3: 45 case 3:
48 return kVideoRotation_270; 46 return kVideoRotation_270;
49 default: 47 default:
50 RTC_NOTREACHED(); 48 RTC_NOTREACHED();
51 return kVideoRotation_0; 49 return kVideoRotation_0;
52 } 50 }
53 } 51 }
54 52
55 } // namespace webrtc 53 } // namespace webrtc
56 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_CVO_H_ 54 #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