[FFmpeg-devel] [PATCH 4/4] avcodec: loongson optimized h264pred with mmi
周晓勇
zhouxiaoyong at loongson.cn
Mon Jul 13 10:04:55 CEST 2015
> > building libavcodec/dca_parser.c with
> > -O0
> > fixes the fate-dca-core and fate-dca-xll failure
>
> looks like a compiler bug:
>
> @@ -66,6 +66,7 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
> for (i = 0; i < buf_size; i++) {
> state = (state << 8) | buf[i];
> if (IS_MARKER(state)) {
> + av_log(0,0, "MRK0 %d %LX %X %d %d\n", i, state, pc1->lastmarker,pc1->framesize, pc1->size);
> if (!pc1->lastmarker ||
> pc1->lastmarker == CORE_MARKER(state) ||
> pc1->lastmarker == DCA_SYNCWORD_SUBSTREAM) {
> @@ -75,6 +76,7 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
> else
> pc1->lastmarker = CORE_MARKER(state);
> i++;
> + av_log(0,0, "END0 %d %LX %X %d %d\n", i, state, pc1->lastmarker,pc1->framesize, pc1->size);
> break;
> }
> }
>
> I get this diff between working and not working:
>
> MRK0 5 7FFE8001FC3C 0 0 0
> END0 6 7FFE8001FC3C 7FFE8001 0 0
> END1 1011 7FFE8001FC3C 7FFE8001 0 1006
> dca_parse_params
> dca_parse_params END
> MRK0 5 FFFF7FFE8001FC3C 7FFE8001 1006 0
> -END0 6 FFFF7FFE8001FC3C 7FFE8001 1006 0
> ENF
> -END1 5 80007FFE8001FC3C 7FFE8001 1006 1006
>
>
> assuming this is really a compiler bug
> can you fix the compiler or where can i find a working "gcc" package ?
>
yes, i find out the bug in gcc. its -fexpensive-optimizations at levels -O2, -O3, -Os.
-O0 and -O1 is ok for fate-dca test, because not include this option.
i am fixing up this bug, so please wait for few days.
More information about the ffmpeg-devel
mailing list