OLD | NEW |
1 /* | 1 /* |
2 * H.26L/H.264/AVC/JVT/14496-10/... reference picture handling | 2 * H.26L/H.264/AVC/JVT/14496-10/... reference picture handling |
3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at> | 3 * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at> |
4 * | 4 * |
5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
6 * | 6 * |
7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 for(j=0; j<3; j++) | 308 for(j=0; j<3; j++) |
309 field[0].linesize[j] <<= 1; | 309 field[0].linesize[j] <<= 1; |
310 field[0].reference = PICT_TOP_FIELD; | 310 field[0].reference = PICT_TOP_FIELD; |
311 field[0].poc= field[0].field_poc[0]; | 311 field[0].poc= field[0].field_poc[0]; |
312 field[1] = field[0]; | 312 field[1] = field[0]; |
313 for(j=0; j<3; j++) | 313 for(j=0; j<3; j++) |
314 field[1].data[j] += frame->linesize[j]; | 314 field[1].data[j] += frame->linesize[j]; |
315 field[1].reference = PICT_BOTTOM_FIELD; | 315 field[1].reference = PICT_BOTTOM_FIELD; |
316 field[1].poc= field[1].field_poc[1]; | 316 field[1].poc= field[1].field_poc[1]; |
317 | 317 |
318 h->luma_weight[list][16+2*i] = h->luma_weight[list][16+2*i+1] = h->l
uma_weight[list][i]; | 318 h->luma_weight[16+2*i][list][0] = h->luma_weight[16+2*i+1][list][0]
= h->luma_weight[i][list][0]; |
319 h->luma_offset[list][16+2*i] = h->luma_offset[list][16+2*i+1] = h->l
uma_offset[list][i]; | 319 h->luma_weight[16+2*i][list][1] = h->luma_weight[16+2*i+1][list][1]
= h->luma_weight[i][list][1]; |
320 for(j=0; j<2; j++){ | 320 for(j=0; j<2; j++){ |
321 h->chroma_weight[list][16+2*i][j] = h->chroma_weight[list][16+2*
i+1][j] = h->chroma_weight[list][i][j]; | 321 h->chroma_weight[16+2*i][list][j][0] = h->chroma_weight[16+2*i+1
][list][j][0] = h->chroma_weight[i][list][j][0]; |
322 h->chroma_offset[list][16+2*i][j] = h->chroma_offset[list][16+2*
i+1][j] = h->chroma_offset[list][i][j]; | 322 h->chroma_weight[16+2*i][list][j][1] = h->chroma_weight[16+2*i+1
][list][j][1] = h->chroma_weight[i][list][j][1]; |
323 } | 323 } |
324 } | 324 } |
325 } | 325 } |
326 for(j=0; j<h->ref_count[1]; j++){ | 326 for(j=0; j<h->ref_count[1]; j++){ |
327 for(i=0; i<h->ref_count[0]; i++) | 327 for(i=0; i<h->ref_count[0]; i++) |
328 h->implicit_weight[j][16+2*i] = h->implicit_weight[j][16+2*i+1] = h-
>implicit_weight[j][i]; | 328 h->implicit_weight[j][16+2*i] = h->implicit_weight[j][16+2*i+1] = h-
>implicit_weight[j][i]; |
329 memcpy(h->implicit_weight[16+2*j], h->implicit_weight[j], sizeof(*h->i
mplicit_weight)); | 329 memcpy(h->implicit_weight[16+2*j], h->implicit_weight[j], sizeof(*h->i
mplicit_weight)); |
330 memcpy(h->implicit_weight[16+2*j+1], h->implicit_weight[j], sizeof(*h->i
mplicit_weight)); | 330 memcpy(h->implicit_weight[16+2*j+1], h->implicit_weight[j], sizeof(*h->i
mplicit_weight)); |
331 } | 331 } |
332 } | 332 } |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 h->mmco[1].opcode= MMCO_SHORT2UNUSED; | 691 h->mmco[1].opcode= MMCO_SHORT2UNUSED; |
692 h->mmco[1].short_pic_num= h->mmco[0].short_pic_num + 1; | 692 h->mmco[1].short_pic_num= h->mmco[0].short_pic_num + 1; |
693 h->mmco_index= 2; | 693 h->mmco_index= 2; |
694 } | 694 } |
695 } | 695 } |
696 } | 696 } |
697 } | 697 } |
698 | 698 |
699 return 0; | 699 return 0; |
700 } | 700 } |
OLD | NEW |