Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 01/18] avcodec/vp8: Disable segmentation for VP7
@ 2022-09-10  0:19 Andreas Rheinhardt
  2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 02/18] avcodec/vp8: Disable lf_delta " Andreas Rheinhardt
                   ` (16 more replies)
  0 siblings, 17 replies; 23+ messages in thread
From: Andreas Rheinhardt @ 2022-09-10  0:19 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Segmentation is a VP8-feature.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vp8.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 0e16e75faa..c00c5c975e 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -637,7 +637,6 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
         for (i = 0; i < 2; i++)
             memcpy(s->prob->mvc[i], vp7_mv_default_prob[i],
                    sizeof(vp7_mv_default_prob[i]));
-        memset(&s->segmentation, 0, sizeof(s->segmentation));
         memset(&s->lf_delta, 0, sizeof(s->lf_delta));
         memcpy(s->prob[0].scan, ff_zigzag_scan, sizeof(s->prob[0].scan));
     }
@@ -2165,7 +2164,7 @@ void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb,
 {
     int interior_limit, filter_level;
 
-    if (s->segmentation.enabled) {
+    if (!is_vp7 && s->segmentation.enabled) {
         filter_level = s->segmentation.filter_level[mb->segment];
         if (!s->segmentation.absolute_vals)
             filter_level += s->filter.level;
@@ -2435,7 +2434,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void
     else {
         // Make sure the previous frame has read its segmentation map,
         // if we re-use the same map.
-        if (prev_frame && s->segmentation.enabled &&
+        if (!is_vp7 && prev_frame && s->segmentation.enabled &&
             !s->segmentation.update_map)
             ff_thread_await_progress(&prev_frame->tf, mb_y, 0);
         mb = s->macroblocks + (s->mb_height - mb_y - 1) * 2;
@@ -2791,15 +2790,16 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame,
         memset(s->ref_count, 0, sizeof(s->ref_count));
 
         if (s->mb_layout == 1) {
-            // Make sure the previous frame has read its segmentation map,
-            // if we re-use the same map.
-            if (prev_frame && s->segmentation.enabled &&
-                !s->segmentation.update_map)
-                ff_thread_await_progress(&prev_frame->tf, 1, 0);
-            if (is_vp7)
+            if (is_vp7) {
                 ret = vp7_decode_mv_mb_modes(avctx, curframe, prev_frame);
-            else
+            } else {
+                // Make sure the previous frame has read its segmentation map,
+                // if we re-use the same map.
+                if (prev_frame && s->segmentation.enabled &&
+                    !s->segmentation.update_map)
+                    ff_thread_await_progress(&prev_frame->tf, 1, 0);
                 ret = vp8_decode_mv_mb_modes(avctx, curframe, prev_frame);
+            }
             if (ret < 0)
                 goto err;
         }
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-09-11 22:42 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-10  0:19 [FFmpeg-devel] [PATCH 01/18] avcodec/vp8: Disable segmentation for VP7 Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 02/18] avcodec/vp8: Disable lf_delta " Andreas Rheinhardt
2022-09-11  4:29   ` Peter Ross
2022-09-11  4:38     ` Andreas Rheinhardt
2022-09-11 14:41       ` Ronald S. Bultje
2022-09-11 15:09         ` Ronald S. Bultje
2022-09-11 22:41       ` Peter Ross
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 03/18] avcodec/vp8: Remove unused macros Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 04/18] avcodec/vp8: Inline mb_layout for VP7 Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 05/18] avcodec/vp8: Inline inner_filter " Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 06/18] avcodec/vp8: Inline mbskip_enabled " Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 07/18] avcodec/vp8: Pass mb_y explicitly Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 08/18] avcodec/vp8: Inline num_coeff_partitions for VP7 Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 09/18] avcodec/vp8: Disable slice-thread synchronization code " Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 10/18] avcodec/vp8: Inline num_jobs " Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 11/18] avcodec/vp8: Inline jobnr, threadnr " Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 12/18] avcodec/vp8: Inline update_last " Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 13/18] avcodec/vp8: Don't use avctx->execute2 " Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 14/18] avcodec/vp8: Move fade_present from context to stack Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 15/18] avcodec/vp8: Disable frame-threading code for VP7 Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 16/18] avcodec/vp8dsp: Remove declarations of inexistent functions Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 17/18] avcodec/vp8dsp: Constify src in vp8_mc_func Andreas Rheinhardt
2022-09-10  1:07 ` [FFmpeg-devel] [PATCH 18/18] avcodec/vp8: Add const where appropriate Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git