[FFmpeg-cvslog] lavc/videotoolboxdec: fix generating HEVC general_profile_compatibility_flags
rcombs
git at videolan.org
Thu Jun 2 04:14:40 EEST 2022
ffmpeg | branch: master | rcombs <rcombs at rcombs.me> | Sat Apr 16 02:49:09 2022 -0500| [928b22edfe429d17ccfba572eff1f9f3e6892e00] | committer: rcombs
lavc/videotoolboxdec: fix generating HEVC general_profile_compatibility_flags
We store this as an array of bools, not a bitfield.
Signed-off-by: rcombs <rcombs at rcombs.me>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=928b22edfe429d17ccfba572eff1f9f3e6892e00
---
libavcodec/videotoolbox.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index a1933f03f2..c95c53fcf0 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -273,7 +273,16 @@ CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx)
ptlc.profile_idc);
/* unsigned int(32) general_profile_compatibility_flags; */
- memcpy(p + 2, ptlc.profile_compatibility_flag, 4);
+ for (i = 0; i < 4; i++) {
+ AV_W8(p + 2 + i, ptlc.profile_compatibility_flag[i * 8] << 7 |
+ ptlc.profile_compatibility_flag[i * 8 + 1] << 6 |
+ ptlc.profile_compatibility_flag[i * 8 + 2] << 5 |
+ ptlc.profile_compatibility_flag[i * 8 + 3] << 4 |
+ ptlc.profile_compatibility_flag[i * 8 + 4] << 3 |
+ ptlc.profile_compatibility_flag[i * 8 + 5] << 2 |
+ ptlc.profile_compatibility_flag[i * 8 + 6] << 1 |
+ ptlc.profile_compatibility_flag[i * 8 + 7]);
+ }
/* unsigned int(48) general_constraint_indicator_flags; */
AV_W8(p + 6, ptlc.progressive_source_flag << 7 |
More information about the ffmpeg-cvslog
mailing list