From: Shuaijun Z. <sz...@re...> - 2011-12-09 16:19:33
|
Hi there, I changed the mplayer code to force the opensvc decoding the basic layer only. But seems it can't work. No picture is decoded. I tested it with the video_5 in opensvc sourceforge and my newly encoded video (with the configuration files from opensvc). The results are same. I changed the code in the file of libavcodec/h264c in mplayer to make sure the opensvc is decoding the basic layer only. The code is as below. let me know if I am doing something wrong or it is the bug in the opensvc decoder, or the svc video is not correct... thank you Jason /** Parse and execute the command. Layer Up, Layer Down, ... */ static void ParseCmd(H264Context *h){ if(Temporal != -1){ //Only mplayer //specific temporal_id asked at the beginning //av_log(h->s.avctx, AV_LOG_ERROR,"Specifi TemporalId %d %d %d\n", &h -> CurrDqId, h -> TemporalCom, h -> TemporalId); UpdateLayer(h -> DqIdTable, &h -> CurrDqId, &h -> TemporalCom, &h -> TemporalId, SavedTemp, Temporal); //av_log(h->s.avctx, AV_LOG_ERROR,"Specifi TemporalId %d %d %d %d\n", SavedTemp, Temporal, h -> TemporalCom, h -> TemporalId); Temporal = -1; } if(SnrSpatial != -1){ //av_log(h->s.avctx, AV_LOG_ERROR,"%d %d %d %d Curr %d Max %d Command %d\n", h -> DqIdTable[0], h -> DqIdTable[1], h -> DqIdTable[2], h -> DqIdTable[3], h -> CurrDqId, h -> MaxDqId, SnrSpatial); if(SnrSpatial == 3){ //Mplayer specific option //Used as the MaxDqId was equal to SavedId *UpdateLayer(h -> DqIdTable, &h -> CurrDqId, &h -> TemporalCom, &h -> TemporalId, SavedId, 2); // This line is always executed while I test it. I changed the **SavedId to 0, so that the decoding layer is always basic layer (layer 0) * }else{ UpdateLayer(h -> DqIdTable, &h -> CurrDqId, &h -> TemporalCom, &h -> TemporalId, h -> MaxDqId, SnrSpatial); } SnrSpatial = -1; } } |