Summary: | Support HDR decode in SW VP9 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jer Noble <jer.noble> | ||||||||||||
Component: | New Bugs | Assignee: | Jer Noble <jer.noble> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | darin, eric.carlson, ews-watchlist, glenn, peng.liu6, philipj, sergio, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Jer Noble
2020-07-29 11:57:55 PDT
Created attachment 405480 [details]
Patch
Created attachment 405481 [details]
Patch
Comment on attachment 405480 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405480&action=review r=me once the bots are happy > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:277 > + CFTypeRef configurationRecord = CFDictionaryGetValue((CFDictionaryRef)extensionAtoms, CFSTR("vpcC")); `auto configurationRecord = static_cast<CFDataRef>(CFDictionaryGetValue(...` > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:281 > + auto configurationRecordSize = CFDataGetLength((CFDataRef)configurationRecord); The cast isn't necessary with the above. > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:285 > + auto configurationRecordData = CFDataGetBytePtr((CFDataRef)configurationRecord); Ditto > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:305 > + CFMutableArrayRef cfPixelFormats = CFArrayCreateMutable(kCFAllocatorDefault, 2, &kCFTypeArrayCallBacks); 'auto cfPixelFormats = ...` > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:310 > + CFNumberRef borderPixelsValue = createNumber(32); `auto borderPixelsValue = ...` > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:326 > + CFDictionaryRef attributes = CFDictionaryCreate(kCFAllocatorDefault, keys, values, std::size(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); `auto attributes = ...` > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:342 > + CFRelease(pixelBufferAttributes); Double release! Comment on attachment 405480 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405480&action=review >> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:305 >> + CFMutableArrayRef cfPixelFormats = CFArrayCreateMutable(kCFAllocatorDefault, 2, &kCFTypeArrayCallBacks); > > 'auto cfPixelFormats = ...` Why not use CFArrayCreate instead of CRArrayCreateMutable? > Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:308 > + CFRelease(formatNumber); If this was WebKit code, not libwebtrc, I would suggest using adoptCF instead of CFRelease. It’s hard to get reference counting right the old manual way. Created attachment 405489 [details]
Patch for landing.
Comment on attachment 405480 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405480&action=review >> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:277 >> + CFTypeRef configurationRecord = CFDictionaryGetValue((CFDictionaryRef)extensionAtoms, CFSTR("vpcC")); > > `auto configurationRecord = static_cast<CFDataRef>(CFDictionaryGetValue(...` Yeah, much better. >> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:305 >> + CFMutableArrayRef cfPixelFormats = CFArrayCreateMutable(kCFAllocatorDefault, 2, &kCFTypeArrayCallBacks); > > 'auto cfPixelFormats = ...` Ok. >> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:310 >> + CFNumberRef borderPixelsValue = createNumber(32); > > `auto borderPixelsValue = ...` Ok. >> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:326 >> + CFDictionaryRef attributes = CFDictionaryCreate(kCFAllocatorDefault, keys, values, std::size(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); > > `auto attributes = ...` Ok. >> Source/ThirdParty/libwebrtc/Source/webrtc/sdk/WebKit/WebKitVP9Decoder.cpp:342 >> + CFRelease(pixelBufferAttributes); > > Double release! Ooh, that's bad! Comment on attachment 405489 [details] Patch for landing. View in context: https://bugs.webkit.org/attachment.cgi?id=405489&action=review > Source/WebCore/ChangeLog:9 > + CMFormatDescription attached to each incoming video fram. Nit: s/fram/frame. > Source/WebCore/ChangeLog:13 > + in this situations. Nit: s/this/those. Created attachment 405499 [details]
Patch for landing
Created attachment 405503 [details]
Patch for landing
Committed r265073: <https://trac.webkit.org/changeset/265073> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405503 [details]. |