
Recherche avancée
Autres articles (91)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (10691)
-
Downscaling a video from 1080p to 480p using swscale and encoding to x265 gives a glitched output
5 mai 2023, par lokit khemkaI am basically first scaling a frame and then sending the frame to the encoder as below :


scaled_frame->pts = input_frame->pts;
scaled_frame->pkt_dts = input_frame->pkt_dts;
scaled_frame->pict_type = input_frame->pict_type;
sws_scale_frame(encoder->sws_ctx, scaled_frame, input_frame);
if (encode_video(decoder, encoder, scaled_frame))
 return -1;



The scaling context is configured as :


scaled_frame->width = 854;
scaled_frame->height=480; 
encoder->sws_ctx = sws_getContext(1920, 1080,
 decoder->video_avcc->pix_fmt, 
 scaled_frame->width, scaled_frame->height, decoder->video_avcc->pix_fmt, SWS_BICUBIC, NULL, NULL, NULL );
 if (!encoder->sws_ctx){logging("Cannot Create Scaling Context."); return -1;}



The encoder is configured as :


encoder_sc->video_avcc->height = decoder_ctx->height; //1080
 encoder_sc->video_avcc->width = decoder_ctx->width; //1920
 encoder_sc->video_avcc->bit_rate = 2 * 1000 * 1000;
 encoder_sc->video_avcc->rc_buffer_size = 4 * 1000 * 1000;
 encoder_sc->video_avcc->rc_max_rate = 2 * 1000 * 1000;
 encoder_sc->video_avcc->rc_min_rate = 2.5 * 1000 * 1000;

 encoder_sc->video_avcc->time_base = av_inv_q(input_framerate);
 encoder_sc->video_avs->time_base = encoder_sc->video_avcc->time_base;



When I get the output, the output video is 1080p and I have glitches like :


I changed the encoder avcc resolution to 480p (854 x 480). However, that is causing the video to get sliced to the top quarter of the original frame.
I am new to FFMPEG and video processing in general.


EDIT : I am adding the minimal reproducible code sample. However, it is really long because I need to include code for decoding, scaling and then encoding because the possible error is either in scaling or encoding :


#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>timestamp.h>
#include <libavutil></libavutil>opt.h>
#include <libswscale></libswscale>swscale.h>

#include 
#include 

typedef struct StreamingContext{
 AVFormatContext* avfc;
 AVCodec *video_avc;
 AVCodec *audio_avc;
 AVStream *video_avs;
 AVStream *audio_avs;
 AVCodecContext *video_avcc;
 AVCodecContext *audio_avcc;
 int video_index;
 int audio_index;
 char* filename;
 struct SwsContext *sws_ctx;
}StreamingContext;


typedef struct StreamingParams{
 char copy_video;
 char copy_audio;
 char *output_extension;
 char *muxer_opt_key;
 char *muxer_opt_value;
 char *video_codec;
 char *audio_codec;
 char *codec_priv_key;
 char *codec_priv_value;
}StreamingParams;

void logging(const char *fmt, ...)
{
 va_list args;
 fprintf(stderr, "LOG: ");
 va_start(args, fmt);
 vfprintf(stderr, fmt, args);
 va_end(args);
 fprintf(stderr, "\n");
}

int fill_stream_info(AVStream *avs, AVCodec **avc, AVCodecContext **avcc)
{
 *avc = avcodec_find_decoder(avs->codecpar->codec_id);
 if (!*avc)
 {
 logging("Failed to find the codec.\n");
 return -1;
 }

 *avcc = avcodec_alloc_context3(*avc);
 if (!*avcc)
 {
 logging("Failed to alloc memory for codec context.");
 return -1;
 }

 if (avcodec_parameters_to_context(*avcc, avs->codecpar) < 0)
 {
 logging("Failed to fill Codec Context.");
 return -1;
 }

 if (avcodec_open2(*avcc, *avc, NULL) < 0)
 {
 logging("Failed to open Codec.");
 return -1;
 }

 return 0;
}

int open_media(const char *in_filename, AVFormatContext **avfc)
{
 *avfc = avformat_alloc_context();

 if (!*avfc)
 {
 logging("Failed to Allocate Memory for Format Context");
 return -1;
 }

 if (avformat_open_input(avfc, in_filename, NULL, NULL) != 0)
 {
 logging("Failed to open input file %s", in_filename);
 return -1;
 }

 if (avformat_find_stream_info(*avfc, NULL) < 0)
 {
 logging("Failed to get Stream Info.");
 return -1;
 }
}

int prepare_decoder(StreamingContext *sc)
{
 for (int i = 0; i < sc->avfc->nb_streams; i++)
 {
 if (sc->avfc->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
 {
 sc->video_avs = sc->avfc->streams[i];
 sc->video_index = i;

 if (fill_stream_info(sc->video_avs, &sc->video_avc, &sc->video_avcc))
 {
 return -1;
 }
 }
 else
 {
 logging("Skipping Streams other than Video.");
 }
 }
 return 0;
}

int prepare_video_encoder(StreamingContext *encoder_sc, AVCodecContext *decoder_ctx, AVRational input_framerate,
 StreamingParams sp)
{
 encoder_sc->video_avs = avformat_new_stream(encoder_sc->avfc, NULL);
 encoder_sc->video_avc = avcodec_find_encoder_by_name(sp.video_codec);
 if (!encoder_sc->video_avc)
 {
 logging("Cannot find the Codec.");
 return -1;
 }

 encoder_sc->video_avcc = avcodec_alloc_context3(encoder_sc->video_avc);
 if (!encoder_sc->video_avcc)
 {
 logging("Could not allocate memory for Codec Context.");
 return -1;
 }

 av_opt_set(encoder_sc->video_avcc->priv_data, "preset", "fast", 0);
 if (sp.codec_priv_key && sp.codec_priv_value)
 av_opt_set(encoder_sc->video_avcc->priv_data, sp.codec_priv_key, sp.codec_priv_value, 0);

 encoder_sc->video_avcc->height = decoder_ctx->height;
 encoder_sc->video_avcc->width = decoder_ctx->width;
 encoder_sc->video_avcc->sample_aspect_ratio = decoder_ctx->sample_aspect_ratio;

 if (encoder_sc->video_avc->pix_fmts)
 encoder_sc->video_avcc->pix_fmt = encoder_sc->video_avc->pix_fmts[0];
 else
 encoder_sc->video_avcc->pix_fmt = decoder_ctx->pix_fmt;

 encoder_sc->video_avcc->bit_rate = 2 * 1000 * 1000;
 encoder_sc->video_avcc->rc_buffer_size = 4 * 1000 * 1000;
 encoder_sc->video_avcc->rc_max_rate = 2 * 1000 * 1000;
 encoder_sc->video_avcc->rc_min_rate = 2.5 * 1000 * 1000;

 encoder_sc->video_avcc->time_base = av_inv_q(input_framerate);
 encoder_sc->video_avs->time_base = encoder_sc->video_avcc->time_base;

 

 if (avcodec_open2(encoder_sc->video_avcc, encoder_sc->video_avc, NULL) < 0)
 {
 logging("Could not open the Codec.");
 return -1;
 }
 avcodec_parameters_from_context(encoder_sc->video_avs->codecpar, encoder_sc->video_avcc);
 return 0;
}

int encode_video(StreamingContext *decoder, StreamingContext *encoder, AVFrame *input_frame)
{
 if (input_frame)
 input_frame->pict_type = AV_PICTURE_TYPE_NONE;

 AVPacket *output_packet = av_packet_alloc();
 if (!output_packet)
 {
 logging("Could not allocate memory for Output Packet.");
 return -1;
 }

 int response = avcodec_send_frame(encoder->video_avcc, input_frame);

 while (response >= 0)
 {
 response = avcodec_receive_packet(encoder->video_avcc, output_packet);
 if (response == AVERROR(EAGAIN) || response == AVERROR_EOF)
 {
 break;
 }
 else if (response < 0)
 {
 logging("Error while receiving packet from encoder: %s", av_err2str(response));
 return -1;
 }

 output_packet->stream_index = decoder->video_index;
 output_packet->duration = encoder->video_avs->time_base.den / encoder->video_avs->time_base.num / decoder->video_avs->avg_frame_rate.num * decoder->video_avs->avg_frame_rate.den;

 av_packet_rescale_ts(output_packet, decoder->video_avs->time_base, encoder->video_avs->time_base);
 response = av_interleaved_write_frame(encoder->avfc, output_packet);
 if (response != 0)
 {
 logging("Error %d while receiving packet from decoder: %s", response, av_err2str(response));
 return -1;
 }
 }

 av_packet_unref(output_packet);
 av_packet_free(&output_packet);

 return 0;
}

int transcode_video(StreamingContext *decoder, StreamingContext *encoder, AVPacket *input_packet, AVFrame *input_frame, AVFrame *scaled_frame)
{
 int response = avcodec_send_packet(decoder->video_avcc, input_packet);
 if (response < 0)
 {
 logging("Error while sending the Packet to Decoder: %s", av_err2str(response));
 return response;
 }

 while (response >= 0)
 {
 response = avcodec_receive_frame(decoder->video_avcc, input_frame);
 
 if (response == AVERROR(EAGAIN) || response == AVERROR_EOF)
 {
 break;
 }
 else if (response < 0)
 {
 logging("Error while receiving frame from Decoder: %s", av_err2str(response));
 return response;
 }
 if (response >= 0)
 {
 scaled_frame->pts = input_frame->pts;
 scaled_frame->pkt_dts = input_frame->pkt_dts;
 scaled_frame->pict_type = input_frame->pict_type;
 sws_scale_frame(encoder->sws_ctx, scaled_frame, input_frame);
 if (encode_video(decoder, encoder, scaled_frame))
 return -1;
 }

 av_frame_unref(input_frame);
 }
 return 0;
}

int main(int argc, char *argv[])
{
 StreamingParams sp = {0};
 sp.copy_audio = 1;
 sp.copy_video = 0;
 sp.video_codec = "libx265";


 StreamingContext *decoder = (StreamingContext *)calloc(1, sizeof(StreamingContext));
 decoder->filename = argv[1];

 StreamingContext *encoder = (StreamingContext *)calloc(1, sizeof(StreamingContext));
 encoder->filename = argv[2];

 if (sp.output_extension)
 {
 strcat(encoder->filename, sp.output_extension);
 }

 if (open_media(decoder->filename, &decoder->avfc))
 return -1;
 if (prepare_decoder(decoder))
 return -1;

 avformat_alloc_output_context2(&encoder->avfc, NULL, NULL, encoder->filename);
 if (!encoder->avfc)
 {
 logging("Could not allocate memory for output Format Context.");
 return -1;
 }

 AVRational input_framerate = av_guess_frame_rate(decoder->avfc, decoder->video_avs, NULL);
 prepare_video_encoder(encoder, decoder->video_avcc, input_framerate, sp);


 if (encoder->avfc->oformat->flags & AVFMT_GLOBALHEADER)
 encoder->avfc->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

 if (!(encoder->avfc->oformat->flags & AVFMT_NOFILE))
 {
 if (avio_open(&encoder->avfc->pb, encoder->filename, AVIO_FLAG_WRITE) < 0)
 {
 logging("could not open the output file");
 return -1;
 }
 }

 AVDictionary *muxer_opts = NULL;

 if (sp.muxer_opt_key && sp.muxer_opt_value)
 {
 av_dict_set(&muxer_opts, sp.muxer_opt_key, sp.muxer_opt_value, 0);
 }

 if (avformat_write_header(encoder->avfc, &muxer_opts) < 0)
 {
 logging("an error occurred when opening output file");
 return -1;
 }

 AVFrame *input_frame = av_frame_alloc();
 AVFrame *scaled_frame = av_frame_alloc();
 if (!input_frame || !scaled_frame)
 {
 logging("Failed to allocate memory for AVFrame");
 return -1;
 }

 // scaled_frame->format = AV_PIX_FMT_YUV420P;
 scaled_frame->width = 854;
 scaled_frame->height=480; 

 //Creating Scaling Context
 encoder->sws_ctx = sws_getContext(1920, 1080,
 decoder->video_avcc->pix_fmt, 
 scaled_frame->width, scaled_frame->height, decoder->video_avcc->pix_fmt, SWS_BICUBIC, NULL, NULL, NULL );
 if (!encoder->sws_ctx){logging("Cannot Create Scaling Context."); return -1;}


 AVPacket *input_packet = av_packet_alloc();
 if (!input_packet)
 {
 logging("Failed to allocate memory for AVPacket.");
 return -1;
 }

 while (av_read_frame(decoder->avfc, input_packet) >= 0)
 {
 if (decoder->avfc->streams[input_packet->stream_index]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
 {
 if (transcode_video(decoder, encoder, input_packet, input_frame, scaled_frame))
 return -1;
 av_packet_unref(input_packet);
 }
 else
 {
 logging("Ignoring all nonvideo packets.");
 }
 }

 if (encode_video(decoder, encoder, NULL))
 return -1;

 av_write_trailer(encoder->avfc);

 if (muxer_opts != NULL)
 {
 av_dict_free(&muxer_opts);
 muxer_opts = NULL;
 }

 if (input_frame != NULL)
 {
 av_frame_free(&input_frame);
 input_frame = NULL;
 }

 if (input_packet != NULL)
 {
 av_packet_free(&input_packet);
 input_packet = NULL;
 }

 avformat_close_input(&decoder->avfc);

 avformat_free_context(decoder->avfc);
 decoder->avfc = NULL;
 avformat_free_context(encoder->avfc);
 encoder->avfc = NULL;

 avcodec_free_context(&decoder->video_avcc);
 decoder->video_avcc = NULL;
 avcodec_free_context(&decoder->audio_avcc);
 decoder->audio_avcc = NULL;

 free(decoder);
 decoder = NULL;
 free(encoder);
 encoder = NULL;

 return 0;
}



The video I am using for testing is available at the repo : https://github.com/leandromoreira/ffmpeg-libav-tutorial


The file name is small_bunny_1080p_60fps.mp4


-
FFmpeg fails to draw text
6 avril 2024, par Edoardo BalducciI've rarely used ffmpeg before, so, sorry If the question is too dumb.
I have a problem adding a text layer to a video frame using ffmpeg.


This is my current code :


import subprocess
from PyQt5.QtGui import QPixmap, QImage
from PyQt5.QtWidgets import QLabel

class VideoThumbnailLabel(QLabel):
 def __init__(self, file_path, *args, **kwargs):
 super().__init__(*args, **kwargs)
 self.video = video
 video_duration = self.get_video_duration(file_path)
 thumbnail_path = self.get_thumbnail(file_path, video_duration)
 if thumbnail_path:
 self.setPixmap(QPixmap(thumbnail_path).scaled(160, 90, Qt.KeepAspectRatio))
 self.setToolTip(f"{video.title}\n{video.description}")

 def get_video_duration(self, video_path):
 """Returns the duration of the video in seconds."""
 command = [
 'ffprobe', '-v', 'error', '-show_entries',
 'format=duration', '-of',
 'default=noprint_wrappers=1:nokey=1', video_path
 ]
 try:
 result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
 if result.returncode != 0:
 print(f"ffprobe error: {result.stderr}")
 return 0
 duration = float(result.stdout)
 return int(duration) # Returning duration as an integer for simplicity
 except Exception as e:
 print(f"Error getting video duration: {e}")
 return 0

 def get_thumbnail(self, video_path, duration):
 """Generates a thumbnail with the video duration overlaid."""
 output_path = "thumbnail.jpg" # Temporary thumbnail file
 duration_str = f"{duration // 3600:02d}:{(duration % 3600) // 60:02d}:{duration % 60:02d}"
 command = [
 'ffmpeg', '-i', video_path,
 '-ss', '00:00:01', # Time to take the screenshot
 '-frames:v', '1', # Number of frames to capture
 '-vf', f"drawtext=text='Duration: {duration_str}':x=10:y=10:fontsize=24:fontcolor=white",
 '-q:v', '2', # Output quality
 '-y', # Overwrite output files without asking
 output_path
 ]
 try:
 result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 if result.returncode != 0:
 print(f"ffmpeg error: {result.stderr}")
 return None
 return output_path
 except Exception as e:
 print(f"Error generating thumbnail with duration: {e}")
 return None



and it is used like this :


for i, video in enumerate(self.videos):
 video_widget = VideoThumbnailLabel(video.file)
 video_widget.mousePressEvent = lambda event, v=video: self.onThumbnailClick(
 v
 )
 self.layout.addWidget(video_widget, i // 3, i % 3)



I'm facing a problem where I am not able to get the thumbnail if I try to add the duration (I've tested it without the draw filter and worked fine)


I get this error (from the
result.returncode
) that I'm not able to comprehend :

ffmpeg error: b"ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers\n built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)\n configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon\n libavutil 58. 29.100 / 58. 29.100\n libavcodec 60. 31.102 / 60. 31.102\n libavformat 60. 16.100 / 60. 16.100\n libavdevice 60. 3.100 / 60. 3.100\n libavfilter 9. 12.100 / 9. 12.100\n libswscale 7. 5.100 / 7. 5.100\n libswresample 4. 12.100 / 4. 12.100\n libpostproc 57. 3.100 / 57. 3.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/edoardo/Projects/work/test/BigBuckBunny.mp4':\n Metadata:\n major_brand : mp42\n minor_version : 0\n compatible_brands: isomavc1mp42\n creation_time : 2010-01-10T08:29:06.000000Z\n Duration: 00:09:56.47, start: 0.000000, bitrate: 2119 kb/s\n Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)\n Metadata:\n creation_time : 2010-01-10T08:29:06.000000Z\n handler_name : (C) 2007 Google Inc. v08.13.2007.\n vendor_id : [0][0][0][0]\n Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 1991 kb/s, 24 fps, 24 tbr, 24k tbn (default)\n Metadata:\n creation_time : 2010-01-10T08:29:06.000000Z\n handler_name : (C) 2007 Google Inc. v08.13.2007.\n vendor_id : [0][0][0][0]\n[Parsed_drawtext_0 @ 0x60000331cd10] Both text and text file provided. Please provide only one\n[AVFilterGraph @ 0x600002018000] Error initializing filters\n[vost#0:0/mjpeg @ 0x13ce0c7e0] Error initializing a simple filtergraph\nError opening output file thumbnail.jpg.\nError opening output files: Invalid argument\n"



I've installed both
ffmpeg
andffmprobe
in my machine :

┌(edoardomacbook-air)-[~/Projects/work/tests-scripts] 
└─ $ ffmpeg -version && ffprobe -version 2 ⚙ 
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
ffprobe version 6.1.1 Copyright (c) 2007-2023 the FFmpeg developers
built with Apple clang version 15.0.0 (clang-1500.1.0.2.5)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.1.1_4 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100



Does anyone see the problem ?



P.S. : I know that I havent provided a minimal reproducible example, but since I don't know where the problem lies I didn't want to exclude anything


-
x86 : replace explicit REP_RETs with RETs
1er février 2023, par Lynnex86 : replace explicit REP_RETs with RETs
From x86inc :
> On AMD cpus <=K10, an ordinary ret is slow if it immediately follows either
> a branch or a branch target. So switch to a 2-byte form of ret in that case.
> We can automatically detect "follows a branch", but not a branch target.
> (SSSE3 is a sufficient condition to know that your cpu doesn't have this problem.)x86inc can automatically determine whether to use REP_RET rather than
REP in most of these cases, so impact is minimal. Additionally, a few
REP_RETs were used unnecessary, despite the return being nowhere near a
branch.The only CPUs affected were AMD K10s, made between 2007 and 2011, 16
years ago and 12 years ago, respectively.In the future, everyone involved with x86inc should consider dropping
REP_RETs altogether.- [DH] libavcodec/x86/aacpsdsp.asm
- [DH] libavcodec/x86/ac3dsp.asm
- [DH] libavcodec/x86/alacdsp.asm
- [DH] libavcodec/x86/audiodsp.asm
- [DH] libavcodec/x86/dirac_dwt.asm
- [DH] libavcodec/x86/fft.asm
- [DH] libavcodec/x86/flacdsp.asm
- [DH] libavcodec/x86/h264_chromamc.asm
- [DH] libavcodec/x86/h264_chromamc_10bit.asm
- [DH] libavcodec/x86/h264_deblock_10bit.asm
- [DH] libavcodec/x86/h264_idct.asm
- [DH] libavcodec/x86/h264_idct_10bit.asm
- [DH] libavcodec/x86/h264_intrapred.asm
- [DH] libavcodec/x86/h264_intrapred_10bit.asm
- [DH] libavcodec/x86/h264_qpel_10bit.asm
- [DH] libavcodec/x86/h264_qpel_8bit.asm
- [DH] libavcodec/x86/h264_weight.asm
- [DH] libavcodec/x86/h264_weight_10bit.asm
- [DH] libavcodec/x86/hevc_sao.asm
- [DH] libavcodec/x86/hevc_sao_10bit.asm
- [DH] libavcodec/x86/hpeldsp.asm
- [DH] libavcodec/x86/hpeldsp_vp3.asm
- [DH] libavcodec/x86/huffyuvdsp.asm
- [DH] libavcodec/x86/jpeg2000dsp.asm
- [DH] libavcodec/x86/lossless_videodsp.asm
- [DH] libavcodec/x86/lossless_videoencdsp.asm
- [DH] libavcodec/x86/me_cmp.asm
- [DH] libavcodec/x86/pngdsp.asm
- [DH] libavcodec/x86/qpel.asm
- [DH] libavcodec/x86/qpeldsp.asm
- [DH] libavcodec/x86/rv34dsp.asm
- [DH] libavcodec/x86/rv40dsp.asm
- [DH] libavcodec/x86/sbrdsp.asm
- [DH] libavcodec/x86/takdsp.asm
- [DH] libavcodec/x86/utvideodsp.asm
- [DH] libavcodec/x86/v210.asm
- [DH] libavcodec/x86/vc1dsp_mc.asm
- [DH] libavcodec/x86/videodsp.asm
- [DH] libavcodec/x86/vp8dsp.asm
- [DH] libavfilter/x86/af_volume.asm
- [DH] libavfilter/x86/avf_showcqt.asm
- [DH] libavfilter/x86/scene_sad.asm
- [DH] libavfilter/x86/vf_blend.asm
- [DH] libavfilter/x86/vf_framerate.asm
- [DH] libavfilter/x86/vf_gradfun.asm
- [DH] libavfilter/x86/vf_hqdn3d.asm
- [DH] libavfilter/x86/vf_interlace.asm
- [DH] libavfilter/x86/vf_maskedmerge.asm
- [DH] libavfilter/x86/vf_stereo3d.asm
- [DH] libavfilter/x86/vf_w3fdif.asm
- [DH] libavutil/x86/float_dsp.asm
- [DH] libavutil/x86/lls.asm
- [DH] libswresample/x86/audio_convert.asm
- [DH] libswresample/x86/rematrix.asm
- [DH] libswscale/x86/input.asm
- [DH] libswscale/x86/output.asm
- [DH] libswscale/x86/scale.asm
- [DH] libswscale/x86/scale_avx2.asm
- [DH] libswscale/x86/yuv2yuvX.asm
- [DH] libswscale/x86/yuv_2_rgb.asm
- [DH] tests/checkasm/x86/checkasm.asm