Skip to content

Commit

Permalink
Исправлены артефакты при аппаратном декодировании некоторых VP9 поток…
Browse files Browse the repository at this point in the history
…ов (код из LAV).
  • Loading branch information
Aleksoid1978 committed May 22, 2024
1 parent ab9da53 commit 29395d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/custom_code/ffmpeg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* libavcodec/dxva2.c
* libavcodec/dxva2_hevc.c
* libavcodec/dxva2_internal.h
* libavcodec/dxva2_vp9.c
* libavcodec/h264_refs.c
* libavcodec/h264_slice.c
* libavcodec/h264dec.c
Expand Down
8 changes: 6 additions & 2 deletions src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ int ff_dxva2_vp9_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACont

/* segmentation data */
pp->stVP9Segments.wSegmentInfoFlags = (h->h.segmentation.enabled << 0) |
(h->h.segmentation.update_map << 1) |
(h->h.segmentation.temporal << 2) |
// ==> Start patch MPC
((h->h.segmentation.enabled && h->h.segmentation.update_map) << 1) |
((h->h.segmentation.enabled && h->h.segmentation.temporal) << 2) |
//(h->h.segmentation.update_map << 1) |
//(h->h.segmentation.temporal << 2) |
// ==> End patch MPC
(h->h.segmentation.absolute_vals << 3) |
(0 << 4); /* ReservedSegmentFlags4Bits */

Expand Down

2 comments on commit 29395d9

@v0lt
Copy link
Collaborator

@v0lt v0lt commented on 29395d9 May 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В FFmpeg появилось такое исправление
FFmpeg/FFmpeg@2b11a8b

@Aleksoid1978
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У нас правильнее.

Please sign in to comment.