
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (47)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Création définitive du canal
12 mars 2010, parLorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
A la validation, vous recevez un email vous invitant donc à créer votre canal.
Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)
Sur d’autres sites (8333)
-
avcodec/av1dec : Move message of OBU info back to the beginning
28 décembre 2023, par Fei Wang -
Hardware accelerated decoding with FFmpeg falls back to software decoding
9 février 2024, par iexavSo I have followed the FFmpeg example for hardware accelerated decoding exactly as it is (I am referring to this example).


https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/hw_decode.c#L76



But I still seem to be decoding with the software decoder. When I open the task manager on windows the GPU isn't getting used. Before I make a call to av_hwframe_transfer_data() I check whether the frame is in the relevant hw_pix_fmt format and it is. Everything works, no errors, nothing, except the GPU is doing nothing. Now as an example I tried decoding a video that uses vp9 as a codec. If I specify the hardware accelerated codec I want by name it actually does work.


vidCodec=avcodec_find_decoder_by_name("vp9_cuvid"); 



When I do this and look at the task manager I can see that the CPU does much less work and my GPU actually does Video Decode work. Having to specify the hardware accelerated decoder for every single video I am decoding is ridiculous though.


Edit : as per user4581301's answer, here are the pieces of relevant code. (It's actually in java because I am using the java FFmpeg wrapper but it's basically just making a bunch of calls to FFmpeg functions.)



 ArrayList<string> deviceTypes = new ArrayList<>();
 int type = AV_HWDEVICE_TYPE_NONE;
 while ((type = av_hwdevice_iterate_types(type)) != AV_HWDEVICE_TYPE_NONE) {
 BytePointer p = av_hwdevice_get_type_name(type);

 deviceTypes.add(CString(p));
 }
 boolean flag=false;

 for(int j=0;j* Allocate a codec context for the decoder */
 if ((video_c = avcodec_alloc_context3(vidCodec)) == null) {
 throw new Exception("avcodec_alloc_context3() error: Could not allocate video decoding context.");
 }


 /* copy the stream parameters from the muxer */

 if ((ret = avcodec_parameters_to_context(video_c, video_st.codecpar())) < 0) {
 releaseUnsafe();
 throw new Exception("avcodec_parameters_to_context() error " + ret + ": Could not copy the video stream parameters.");
 }
 

 video_c.get_format(AvFormatGetter.getInstance());
 AVBufferRef hardwareDeviceContext =av_hwdevice_ctx_alloc(type);

 if ((ret = av_hwdevice_ctx_create(hardwareDeviceContext, type,(String) null, null, 0)) < 0) {
 System.err.println("Failed to create specified HW device. error " + ret);

 }else{
 video_c.hw_device_ctx(av_buffer_ref(hardwareDeviceContext));

 }
 


 
//The function that gets called for get_format
@Override
 public int call(AVCodecContext context, IntPointer format) {
 int p;


 for (int i=0;;i++) {
 if ((p=format.get(i)) == hw_pix_fmt) {
 return p;
 }
 if(p==-1){
 break;
 }
 }

 System.out.println(hw_pix_fmt +" is not found in the codec context");
 // Error

 return AV_PIX_FMT_NONE;
 }
 
//The method that's used for decoding video frames
 public Optional<boolean> decodeVideoFrame(AVPacket pkt, boolean readPacket, boolean keyFrames) throws Exception {

 int ret;
 // Decode video frame
 if (readPacket) {
 ret = avcodec_send_packet(video_c, pkt);
 
 if (ret < 0) {
 System.out.println("error during decoding");
 return Optional.empty();
 }

 if (pkt.data() == null && pkt.size() == 0) {
 pkt.stream_index(-1);
 }
 
 }

 // Did we get a video frame?
 while (true) {
 ret = avcodec_receive_frame(video_c, picture_hw);

 if (ret == AVERROR_EAGAIN() || ret == AVERROR_EOF()) {
 if (pkt.data() == null && pkt.size() == 0) {
 return Optional.empty();
 } else {

 return Optional.of(true);

 }
 } else if (ret < 0) {

 // Ignore errors to emulate the behavior of the old API
 // throw new Exception("avcodec_receive_frame() error " + ret + ": Error during video decoding.");
 return Optional.of(true);

 }

 if (!keyFrames || picture.pict_type() == AV_PICTURE_TYPE_I) {
 
 if(picture_hw.format()==hw_pix_fmt){
 if (av_hwframe_transfer_data(
 picture, // The frame that will contain the usable data.
 picture_hw, // Frame returned by avcodec_receive_frame()
 0) < 0) {
 throw new Exception("Could not transfer data from gpu to cpu. ");

 }
 }
 //... The rest of the method here
 return Optional.of(false);

 }
 }
 }
</boolean></string>


-
lavc/dxv : fix incorrect back-reference index calculation in DXT5 decoding
30 janvier 2024, par Connor Worleylavc/dxv : fix incorrect back-reference index calculation in DXT5 decoding
This bug causes the DXT5 decoder to produce incorrect block texture data.
After the fix, textures are visually correct and match data decoded by
Resolume Alley (extracted with Nvida Nsight for comparison). Current FATE DXT5
samples did not cover this case.Signed-off-by : Connor Worley <connorbworley@gmail.com>